Proceedings

Constrained Sequential Inference in Machine Learning Using Constraint Programming

Download BibTeX Cite

Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence. Main Track. Pages 2628-2636.

https://doi.org/10.24963/ijcai.2025/293

Abstract

Sequence models in machine learning often struggle to exhibit long-term structure. We consider this problem at inference time in the context of enforcing constraints that are not necessarily featured in the dataset on which the generative model was trained. The difficulty lies in imposing previously-unseen structure while staying close to the training dataset. It is particularly hard for long-term structure, which requires balancing foresight over many yet-to-be generated tokens and the immediacy of next-token predictions from the sequence model. We address this problem by introducing our neurosymbolic framework GeAI-BLAnC. The learned probabilities of the sequence model are mixed in with the marginal probabilities computed from a constraint programming / belief propagation framework applied to a constraint programming model expressing the desired structure.

The next predicted token is then selected from the resulting probability distribution. Experiments in the context of molecule and music generation show that we can achieve the structure imposed post-training without straying too much from the structure of the dataset learned during training.

  1. [Bonlarron and Régin, 2024] Alexandre Bonlarron and Jean- Charles Régin. Markov constraint as large language model surrogate. In Proceedings of the Thirty-Third International Joint Conference on Artificial Intelligence, IJCAI 2024, Jeju, South Korea, August 3-9, 2024, pages 1844-1852.
  2. [Bonlarron et al., 2023] Alexandre Bonlarron, Aurélie Cal- abrèse, Pierre Kornprobst, and Jean-Charles Régin. Con- straints first: A new mdd-based model to generate sen- tences under constraints. In Proceedings of the Thirty- Second International Joint Conference on Artificial Intel- ligence, IJCAI 2023, 19th-25th August 2023, Macao, SAR, China, pages 1893-1901. ijcai.org, 2023. IJCAI
  3. [Choi et al., 2021] Kyoyun Choi, Jonggwon Park, Wan Heo, Sungwook Jeon, and Jonghun Park. Chord conditioned melody generation with transformer based decoders. IEEE Access, 9:42071-42080, 2021.
  4. [Deutsch et al., 2019] Daniel Deutsch, Shyam Upadhyay, and Dan Roth. A general-purpose algorithm for con- strained sequential inference. In Proceedings of the 23rd Conference on Computational Natural Language Learn- ing (CoNLL), pages 482-492, 2019.
  5. [Dragone et al., 2021] Paolo Dragone, Stefano Teso, and Andrea Passerini. Neuro-symbolic constraint program- ming for structured prediction. In Artur S. d'Avila Garcez and Ernesto Jiménez-Ruiz, editors, Proceedings of the 15th International Workshop on Neural-Symbolic Learning and Reasoning as part of the 1st International Joint Conference on Learning & Reasoning (IJCLR 2021), Virtual conference, October 25-27, 2021, volume 2986 of CEUR Workshop Proceedings, pages 6-14. CEUR- WS.org, 2021.
  6. [Hochreiter and Schmidhuber, 1997] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735-1780, 1997.
  7. [Huang et al., 2018] Cheng-Zhi Anna Huang, Ashish Vaswani, Jakob Uszkoreit, Noam Shazeer, Ian Simon, Curtis Hawthorne, Andrew M Dai, Matthew D Hoffman, Monica Dinculescu, and Douglas Eck. Music transformer. arXiv preprint arXiv:1809.04281, 2018.
  8. [Jaques et al., 2017] Natasha Jaques, Shixiang Gu, Dzmitry Bahdanau, José Miguel Hernández-Lobato, Richard E. Turner, and Douglas Eck. Sequence tutor: Conservative fine-tuning of sequence generation models with kl-control. In Doina Precup and Yee Whye Teh, editors, Proceedings of the 34th International Conference on Machine Learn- ing, ICML 2017, Sydney, NSW, Australia, 6-11 August 2017, volume 70 of Proceedings of Machine Learning Re- search, pages 1645-1654. PMLR, 2017.
  9. [Jelinek et al., 2005] F. Jelinek, R. L. Mercer, L. R. Bahl, and J. K. Baker. Perplexity-a measure of the difficulty of speech recognition tasks. The Journal of the Acoustical Society of America, 62(S1):S63-S63, 08 2005.
  10. [Lafleur et al., 2022] Daphné Lafleur, Sarath Chandar, and Gilles Pesant. Combining reinforcement learning and con- straint programming for sequence-generation tasks with hard constraints. In Christine Solnon, editor, 28th Inter- national Conference on Principles and Practice of Con- straint Programming, CP 2022, July 31 to August 8, 2022, Haifa, Israel, volume 235 of LIPIcs, pages 30:1-30:16. Schloss Dagstuhl -Leibniz-Zentrum für Informatik, 2022.
  11. [Lattner et al., 2018] Stefan Lattner, Maarten Grachten, and Gerhard Widmer. Imposing higher-level structure in poly- phonic music generation using convolutional restricted boltzmann machines and constraints. Journal of Creative Music Systems, 2:1-31, 2018.
  12. [Lee et al., 2019] Jay Yoon Lee, Sanket Vaibhav Mehta, Michael Wick, Jean-Baptiste Tristan, and Jaime Carbonell. Gradient-based inference for networks with output con- straints. In Proceedings of the AAAI Conference on Ar- tificial Intelligence, volume 33, pages 4147-4154, 2019.
  13. [Lin, 1991] Jianhua Lin. Divergence measures based on the shannon entropy. IEEE Trans. Inf. Theory, 37(1):145-151, 1991.
  14. [Manibod, 2022] Virasone Manibod. Ajout de structure aux modèles génératifs de séquences avec la programmation par contraintes. Master's thesis, Polytechnique Montréal, August 2022. https://publications.polymtl.ca/10495/. Link
  15. [Marra et al., 2024] Giuseppe Marra, Sebastijan Dumancic, Robin Manhaeve, and Luc De Raedt. From statistical re- lational to neurosymbolic artificial intelligence: A survey. Artif. Intell., 328:104062, 2024.
  16. [Parikh et al., 2016] Ankur P Parikh, Oscar Täckström, Di- panjan Das, and Jakob Uszkoreit. A decomposable atten- tion model for natural language inference. arXiv preprint arXiv:1606.01933, 2016.
  17. [Pearl, 1982] Judea Pearl. Reverend Bayes on Inference En- gines: A Distributed Hierarchical Approach. In David L. Waltz, editor, Proceedings of the National Conference on Artificial Intelligence. Pittsburgh, PA, August 18-20, 1982., pages 133-136. AAAI Press, 1982.
  18. [Pesant, 2004] Gilles Pesant. A regular language member- ship constraint for finite sequences of variables. In Mark Wallace, editor, Principles and Practice of Constraint Pro- gramming -CP 2004, 10th International Conference, CP 2004, Toronto, Canada, September 27 -October 1, 2004, Proceedings, volume 3258 of Lecture Notes in Computer Science, pages 482-495. Springer, 2004.
  19. [Pesant, 2019] Gilles Pesant. From support propagation to belief propagation in constraint programming. Journal of Artificial Intelligence Research, 66:123-150, 2019.
  20. [Régin et al., 2024] Florian Régin, Elisabetta De Maria, and Alexandre Bonlarron. Combining constraint program- ming reasoning with large language model predictions. In Paul Shaw, editor, 30th International Conference on Principles and Practice of Constraint Programming, CP 2024, September 2-6, 2024, Girona, Spain, volume 307 of LIPIcs, pages 25:1-25:18. Schloss Dagstuhl -Leibniz- Zentrum für Informatik, 2024.
  21. [Rossi et al., 2006] Francesca Rossi, Peter Van Beek, and Toby Walsh. Handbook of constraint programming. El- sevier, 2006.
  22. [Simonetta et al., 2018] Federico Simonetta, Filippo Carnovalini, Nicola Orio, and Antonio Rodà. Symbolic music similarity through a graph-based representation. In Stuart Cunningham and Richard Picking, editors, Pro- ceedings of the Audio Mostly 2018 on Sound in Immersion and Emotion, Wrexham, United Kingdom, September 12-14, 2018, pages 26:1-26:7. ACM, 2018.
  23. [Vaswani et al., 2017] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017.
  24. [Weininger, 1988] David Weininger. Smiles, a chemical lan- guage and information system. 1. introduction to method- ology and encoding rules. Journal of Chemical Informa- tion and Computer Sciences, 28(1):31-36, 1988.
  25. [Yang and Lerch, 2020] Li-Chia Yang and Alexander Lerch. On the evaluation of generative models in music. Neural Computing and Applications, 32(9):4773-4784, 2020.
  26. [Yin et al., 2024] Chao Yin, Quentin Cappart, and Gilles Pe- sant. An improved neuro-symbolic architecture to fine- tune generative AI systems. In Bistra Dilkina, editor, Inte- gration of Constraint Programming, Artificial Intelligence, and Operations Research -21st International Conference, CPAIOR 2024, Uppsala, Sweden, May 28-31, 2024, Pro- ceedings, Part II, volume 14743 of Lecture Notes in Com- puter Science, pages 279-288. Springer, 2024.
  27. [Young et al., 2022] Halley Young, Vincent Dumoulin, Pablo S Castro, Jesse Engel, and Cheng-Zhi Anna Huang. Compositional steering of music transformers. Intelligent User Interfaces, 2022.
  28. [Yu et al., 2023] Dongran Yu, Bo Yang, Dayou Liu, Hui Wang, and Shirui Pan. A survey on neural-symbolic learn- ing systems. Neural Networks, 166:105-126, 2023.
  29. [Zaken et al., 2021] Elad Ben Zaken, Shauli Ravfogel, and Yoav Goldberg. Bitfit: Simple parameter-efficient fine- tuning for transformer-based masked language-models. arXiv preprint arXiv:2106.10199, 2021.
  30. [Zhang et al., 2024] Honghua Zhang, Po-Nien Kung, Masahiro Yoshida, Guy Van den Broeck, and Nanyun Peng. Adaptable logical control for large language models. In Amir Globersons, Lester Mackey, Danielle Belgrave, Angela Fan, Ulrich Paquet, Jakub M. Tomczak, and Cheng Zhang, editors, Advances in Neural Infor- mation Processing Systems 38: Annual Conference on Neural Information Processing Systems 2024, NeurIPS 2024, Vancouver, BC, Canada, December 10 -15, 2024, 2024.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards