Proceedings

Intertwining CP and NLP: The Generation of Unreasonably Constrained Sentences

Download BibTeX Cite

Proceedings of the Thirty-Third International Joint Conference on Artificial Intelligence. AI, Arts & Creativity. Pages 7600-7608.

https://doi.org/10.24963/ijcai.2024/841

Abstract

Constrained text generation remains a challenging task, particularly when dealing with hard constraints. Traditional Natural Language Processing (NLP) approaches prioritize generating meaningful and coherent output. Also, the current state-of-the-art methods often lack the expressiveness and constraint satisfaction capabilities to handle such tasks effectively. This paper presents the Constraints First Framework to remedy this issue.

This framework considers a constrained text generation problem as a discrete combinatorial optimization problem. It is solved by a constraint programming method that combines linguistic properties (e.g., n-grams or language level) with other more classical constraints (e.g., the number of characters, syllables, or words). Eventually, a curation phase allows for selecting the best-generated sentences according to perplexity using a large language model.

The effectiveness of this approach is demonstrated by tackling a new more tediously constrained text generation problem: the iconic RADNER sentences problem. This problem aims to generate sentences respecting a set of quite strict rules defined by their use in vision and clinical research. Thanks to our CP-based approach, many new strongly constrained sentences have been successfully generated in an automatic manner. This highlights the potential of our approach to handle unreasonably constrained text generation scenarios.

  1. [Alió et al., 2008] Jorge Alió, Wolfgang Radner, Ana Plaza- Puche, Dolores Ortiz, Mª Neipp, María Quiles, and Jesús Rodríguez-Marín. Design of short spanish sentences for measuring reading performance: Radner-vissum test. J. Cataract Refractive Surg., 34:638-42, 05 2008.
  2. [Amilhastre et al., 2014] Jérôme Amilhastre, Hélène Fargier, Alexandre Niveau, and Cédric Pralet. Com- piling csps: A complexity map of (non-deterministic) multivalued decision diagrams. Int. J. Artif. Intell. T., 23(04):1460015, 2014.
  3. [Barbieri et al., 2012] Gabriele Barbieri, Francois Pachet, Pierre Roy, and Mirko Degli Esposti. Markov constraints for generating lyrics with style. Frontiers in Artificial In- telligence and Applications, 242, 08 2012.
  4. [Bergman et al., 2016] David Bergman, Andre A. Cire, Willem-Jan Hoeve, and John Hooker. Decision Diagrams for Optimization. Springer Publishing Company, Incorpo- rated, 1st edition, 2016.
  5. [Bonlarron and Régin, 2024] Alexandre Bonlarron and Jean- Charles Régin. Markov constraint as large language sur- rogate. In Proc. of the 33th Int. Joint Conf. on Artif. Intell. , IJCAI-24, 2024. in press.
  6. [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 Edith Elkind, editor, Proc. of the 32th Int. Joint Conf. on Artif. Intell. , IJCAI-23, pages 1893-1901, 2023. IJCAI
  7. [Cheng and Yap, 2010] Kenil C.K. Cheng and Roland H.C. Yap. An MDD-based generalized arc consistency algo- rithm for positive and negative table constraints and some global constraints. Constraints, 15:265-304, 2010.
  8. [Garbacea and Mei, 2022] Cristina Garbacea and Qiaozhu Mei. Why is constrained neural language generation par- ticularly challenging? arXiv preprint arXiv:2206.05395, 2022.
  9. [Gentzel et al., 2022] Rebecca Gentzel, Laurent Michel, and Willem-Jan van Hoeve. Heuristics for MDD Propagation in HADDOCK. In Christine Solnon, editor, 28th Int. Conf. on Principles and Practice of Constraint Programming (CP 2022), volume 235 of Leibniz Int. Proc. in Informat- ics (LIPIcs), pages 24:1-24:17, Dagstuhl, Germany, 2022. Schloss Dagstuhl -Leibniz-Zentrum für Informatik.
  10. [Gillard and Schaus, 2022] Xavier Gillard and Pierre Schaus. Large neighborhood search with decision di- agrams. In Int. Joint Conf. on Artif. Intell., IJCAI-22, 2022. [Google, 2023] Google. Palm 2 technical report, 2023. IJCAI
  11. [Hoda et al., 2010] Samid Hoda, Willem-Jan Van Hoeve, and J. N. Hooker. A systematic approach to mdd-based constraint programming. In Proc. of the 16th Int. Conf. on Principles and Practice of Constraint Programming, CP'10, page 266-280, Berlin, Heidelberg, 2010. Springer- Verlag.
  12. [Hokamp and Liu, 2017] Chris Hokamp and Qun Liu. Lex- ically constrained decoding for sequence generation using grid beam search. In Proc. of the 55th Annual Meeting of the Association for Computational Linguistics, pages 1535-1546, Vancouver, Canada, July 2017. Association for Computational Linguistics.
  13. [Jung and Régin, 2022] Victor Jung and Jean-Charles Régin. Efficient operations between MDDs and constraints. In Proc. of the 19th Int. Conf. on the Integration of Constraint Programming, Artificial Intelligence, and Operations Re- search, 2022.
  14. [Jurafsky and Martin, 2009] Dan Jurafsky and James H. Martin. Speech and language processing : an introduction to natural language processing, computational linguistics, and speech recognition. Pearson Prentice Hall, Upper Sad- dle River, N.J., 2009.
  15. [Lecoutre, 2011] Christophe Lecoutre. STR2: Optimized simple tabular reduction for table constraints. Constraints, 16(4):341-371, oct 2011.
  16. [Legge, 2016] Gordon E Legge. Reading digital with low vision. Visible language, 50(2):102, 2016.
  17. [Liu et al., 2021] Yixian Liu, Liwen Zhang, Wenjuan Han, Yue Zhang, and Kewei Tu. Constrained text generation with global guidance -case study on commongen. CoRR, abs/2103.07170, 2021.
  18. [Lu et al., 2022] Ximing Lu, Sean Welleck, Peter West, Li- wei Jiang, Jungo Kasai, Daniel Khashabi, Ronan Le Bras, Lianhui Qin, Youngjae Yu, Rowan Zellers, Noah A. Smith, and Yejin Choi. NeuroLogic A*esque decoding: Con- strained text generation with lookahead heuristics. In Proc. of the 2022 Conf. of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 780-799, Seattle, United States, July 2022. Association for Computational Linguis- tics.
  19. [Malalel et al., 2023] Steve Malalel, Arnaud Malapert, Marie Pelleau, and Jean-Charles Régin. MDD archive for boosting the pareto constraint. In Roland H. C. Yap, editor, 29th Int. Conf. on Principles and Practice of Constraint Programming, CP 2023, August 27-31, 2023, Toronto, Canada, volume 280 of LIPIcs, pages 24:1-24:15. Schloss Dagstuhl -Leibniz-Zentrum für Informatik, 2023.
  20. [Mansfield et al., 1993] J. Stephen Mansfield, Sonia J. Ahn, Gordon E. Legge, and Andrew Luebker. A new reading- acuity chart for normal and low vision. Ophthalmic and Visual Optics/Noninvasive Assessment of the Visual Sys- tem Technical Digest, 3:232-235, 1993.
  21. [Mansfield et al., 2019] J. Stephen Mansfield, Nilsu Atilgan, Angela Lewis, and Gordon Legge. Extending the MN- READ sentence corpus: Computer-generated sentences for measuring visual performance in reading. Vision re- search, 158:11-18, 2019. [
  22. [OpenAI, 2023] OpenAI. Gpt-4 technical report, 2023.
  23. [Pachet and Roy, 2011] Franc ¸ois Pachet and Pierre Roy. Markov constraints: Steerable generation of markov se- quences. Constraints, 16(2):148-172, apr 2011.
  24. [Pachet et al., 2011] Francois Pachet, Pierre Roy, and Gabriele Barbieri. Finite-length markov processes with constraints. In Proc. of the 22th Int. Joint Conf. on Artif. Intell. , IJCAI'11, pages 635-642. AAAI Press, 2011. IJCAI
  25. [Papadopoulos et al., 2014] Alexandre Papadopoulos, Pierre Roy, and Franc ¸ois Pachet. Avoiding plagiarism in markov sequence generation. In Proc. of the 28th AAAI Conf. on Artif. Intell., AAAI'14, page 2731-2737. AAAI Press, 2014.
  26. [Papadopoulos et al., 2015] Alexandre Papadopoulos, Pierre Roy, Jean-Charles Régin, and Franc ¸ois Pachet. Gener- ating all possible palindromes from ngram corpora. In Proc. of the 24th Int. Conf. on Artif. Intell., IJCAI'15, page 2489-2495. AAAI Press, 2015. IJCAI
  27. [Perez and Régin, 2015] Guillaume Perez and Jean-Charles Régin. Efficient operations on mdds for building constraint programming models. In Proc. of the 24th Int. Conf. on Artif. Intell., pages 374-380, 2015. IJCAI
  28. [Post and Vilar, 2018] Matt Post and David Vilar. Fast lex- ically constrained decoding with dynamic beam alloca- tion for neural machine translation. In Proc. of the 2018 Conf. of the North American Chapter of the Association for Computational Linguistics, pages 1314-1324, New Or- leans, Louisiana, June 2018. Association for Computa- tional Linguistics.
  29. [Radner and Diendorfer, 2014] W Radner and G Diendorfer. English sentence optotypes for measuring reading acu- ity and speed -the english version of the radner reading charts. Graefe's archive for clinical and experimental oph- thalmology = Albrecht von Graefes Archiv fur klinische und experimentelle Ophthalmologie, 252, 05 2014.
  30. [Radner, 2017] W. Radner. Reading charts in ophthalmol- ogy. Graefe's Archive for Clinical and Experimental Oph- thalmology, 255(8):1465-1482, August 2017.
  31. [Rosa et al., 2016] Andreia Rosa, Cláudia Farinha, Wolf- gang Radner, Gabriela Diendorfer, Maria Loureiro, and Joaquim Murta. Development of the portuguese ver- sion of a standardized reading test: The radner-coimbra charts. Arquivos Brasileiros de Oftalmologia, 79:238-242, 07 2016.
  32. [Roy and Pachet, 2013] Pierre Roy and Francois Pachet. En- forcing meter in finite-length markov sequences. Proc. of the AAAI Conf. on Artif. Intell., 27(1):854-861, Jun. 2013.
  33. [Rudich et al., 2022] Isaac Rudich, Quentin Cappart, and Louis-Martin Rousseau. Peel-and-bound: Generating stronger relaxed bounds with multivalued decision dia- grams. In Christine Solnon, editor, 28th Int. Conf. on Principles and Practice of Constraint Programming, CP 2022, July 31 to August 8, 2022, Haifa, Israel, volume 235 of LIPIcs, pages 35:1-35:20. Schloss Dagstuhl -Leibniz- Zentrum für Informatik, 2022.
  34. [Shannon, 1951] C. E. Shannon. Prediction and entropy of printed english. The Bell System Technical Journal, 30(1):50-64, 1951.
  35. [Touvron et al., 2023] Hugo Touvron, Thibaut Lavril, Gau- tier Izacard, Xavier Martinet, Marie-Anne Lachaux, Tim- othée Lacroix, Baptiste Rozière, Naman Goyal, Eric Ham- bro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. Llama: Open and efficient foundation language models, 2023.
  36. [Trick, 2003] Michael Trick. A dynamic programming ap- proach for consistency and propagation for knapsack con- straints. Annals of Operations Research, 118:73-84, 2003.
  37. [van Hoeve, 2022] Willem-Jan van Hoeve. Graph color- ing with decision diagrams. Mathematical Programming, 192(1):631-674, 2022.
  38. [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. In Advances in Neural Information Processing Sys- tems, pages 5998-6008, 2017.
  39. [Verhaeghe et al., 2018] Hélène Verhaeghe, Christophe Lecoutre, and Pierre Schaus. Compact-mdd: Efficiently filtering (s) MDD constraints with reversible sparse bit-sets. In 27th Int. Joint Conf. on Artif. Intell. IJCAI-18, 2018. IJCAI
  40. [Verhaeghe et al., 2019] Hélène Verhaeghe, Christophe Lecoutre, and Pierre Schaus. Extending compact-diagram to basic smart multi-valued variable diagrams. In Integra- tion of Constraint Programming, Artificial Intelligence, and Operations Research: 16th Int. Conf., CPAIOR 2019, Thessaloniki, Greece, June 4-7, 2019, Proceedings, pages 581-598. Springer, 2019.
  41. [Wang and Yap, 2022] Ruiwei Wang and Roland H.C. Yap. Encoding multi-valued decision diagram constraints as bi- nary constraint trees. Proc. of the AAAI Conf. on Artif. Intell., 36(4):3850-3858, Jun. 2022.
  42. [Yao et al., 2024] Shunyu Yao, Howard Chen, Austin W. Hanjie, Runzhe Yang, and Karthik R Narasimhan. COL- LIE: Systematic construction of constrained text genera- tion tasks. In 12th Int. Conf. Learning Representations, 2024.

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

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