Proceedings

Towards Automatic Composition of ASP Programs from Natural Language Specifications

Download BibTeX Cite

Proceedings of the Thirty-Third International Joint Conference on Artificial Intelligence. Main Track. Pages 6198-6206.

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

Abstract

This paper moves the first step towards automating the composition of Answer Set Programming (ASP) specifications.

In particular, the following contributions are provided:

(i) A dataset focused on graph-related problem specifications, designed to develop and assess tools for ASP automatic coding;

(ii) A two-step architecture, implemented in the NL2ASP tool, for generating ASP programs from natural language specifications.

NL2ASP uses neural machine translation to transform natural language into Controlled Natural Language (CNL) statements. Subsequently, CNL statements are converted into ASP code using the CNL2ASP tool. An experimental analysis confirms the viability of the approach.

  1. [Alviano et al., 2017] Mario Alviano, Francesco Calimeri, Carmine Dodaro, Davide Fuscà, Nicola Leone, Simona Perri, Francesco Ricca, Pierfrancesco Veltri, and Jessica Zangari. The ASP system DLV2. In LPNMR, volume 10377 of LNCS, pages 215-221. Springer, 2017.
  2. [Alviano et al., 2023] Mario Alviano, Davide Cirimele, and Luis Angel Rodriguez Reiners. Introducing ASP recipes and ASP chef. In ICLP Workshops, volume 3437 of CEUR WP. CEUR-WS.org, 2023.
  3. [Bahdanau et al., 2015] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In ICLR, 2015.
  4. [Banerjee and Lavie, 2005] Satanjeev Banerjee and Alon Lavie. METEOR: an automatic metric for MT evaluation with improved correlation with human judgments. In IEE- valuation@ACL, pages 65-72. ACL, 2005.
  5. [Baral and Dzifcak, 2011] Chitta Baral and Juraj Dzifcak. Solving puzzles described in english by automated trans- lation to answer set programming and learning how to do that translation. In AAAI Fall Symposium: Advances in Cognitive Systems, volume FS-11-01 of AAAI Technical Report. AAAI, 2011.
  6. [Borroto and Ricca, 2023] Manuel A. Borroto and Francesco Ricca. Sparql-qa-v2 system for knowl- edge base question answering. Expert Syst. Appl., 229(Part A):120383, 2023.
  7. [Brewka et al., 2011] Gerhard Brewka, Thomas Eiter, and Miroslaw Truszczynski. Answer set programming at a glance. Commun. ACM, 54(12):92-103, 2011.
  8. [Busoniu et al., 2013] Paula-Andra Busoniu, Johannes Oetsch, Jörg Pührer, Peter Skocovsky, and Hans Tompits. Sealion: An eclipse-based IDE for answer-set program- ming with advanced debugging support. Theory Pract. Log. Program., 13(4-5):657-673, 2013.
  9. [Calimeri et al., 2020] Francesco Calimeri, Wolfgang Faber, Martin Gebser, Giovambattista Ianni, Roland Kaminski, Thomas Krennwallner, Nicola Leone, Marco Maratea, Francesco Ricca, and Torsten Schaub. Asp-core-2 in- put language format. Theory Pract. Log. Program., 20(2):294-309, 2020.
  10. [Caruso et al., 2024] Simone Caruso, Carmine Dodaro, Marco Maratea, Marco Mochi, and Francesco Riccio. CNL2ASP: converting controlled natural language sen- tences into ASP. Theory Pract. Log. Program., 24(2):196- 226, 2024.
  11. [Chen et al., 2021] Mark Chen, Jerry Tworek, and Hee- woo Jun et al. Evaluating large language models trained on code. CoRR, abs/2107.03374, 2021.
  12. [Dakhel et al., 2023] Arghavan Moradi Dakhel, Vahid Maj- dinasab, Amin Nikanjam, Foutse Khomh, Michel C. Des- marais, and Zhen Ming (Jack) Jiang. Github copilot AI pair programmer: Asset or liability? J. Syst. Softw., 203:111734, 2023.
  13. [Dubey et al., 2019] Mohnish Dubey, Debayan Banerjee, Abdelrahman Abdelkawi, and Jens Lehmann. Lc-quad 2.0: A large dataset for complex question answering over wikidata and dbpedia. In ISWC (2), volume 11779 of LNCS, pages 69-78. Springer, 2019.
  14. [Eiter et al., 2007] Thomas Eiter, Michael Fink, and Stefan Woltran. Semantical characterizations and complexity of equivalences in answer set programming. ACM Trans. Comput. Log., 8(3):17, 2007.
  15. [Erdem and Yeniterzi, 2009] Esra Erdem and Reyyan Yen- iterzi. Transforming controlled natural language biomed- ical queries into answer set programs. In BioNLP@HLT- NAACL, pages 117-124. ACL, 2009.
  16. [Erdem et al., 2016] Esra Erdem, Michael Gelfond, and Nicola Leone. Applications of answer set programming. AI Mag., 37(3):53-68, 2016.
  17. [Ernst and Bavota, 2022] Neil A. Ernst and Gabriele Bavota. Ai-driven development is here: Should you worry? IEEE Softw., 39(2):106-110, 2022.
  18. [Fang and Tompits, 2017] Min Fang and Hans Tompits. An approach for representing answer sets in natural language. In DECLARE, volume 10997 of LNCS, pages 115-131. Springer, 2017.
  19. [Febbraro et al., 2011] Onofrio Febbraro, Kristian Reale, and Francesco Ricca. ASPIDE: integrated development environment for answer set programming. In LPNMR, vol- ume 6645 of LNCS, pages 317-330. Springer, 2011.
  20. [Gebser et al., 2012] Martin Gebser, Roland Kaminski, Ben- jamin Kaufmann, and Torsten Schaub. Answer Set Solving in Practice. Synthesis Lectures on Artificial Intelligence and Machine Learning. Morgan & Claypool Publishers, 2012.
  21. [Gebser et al., 2016] Martin Gebser, Roland Kaminski, Ben- jamin Kaufmann, Max Ostrowski, Torsten Schaub, and Philipp Wanko. Theory solving made easy with clingo 5. In ICLP (Technical Communications), volume 52 of OA- SIcs, pages 2:1-2:15. Schloss Dagstuhl -Leibniz-Zentrum für Informatik, 2016.
  22. [Gebser et al., 2020] Martin Gebser, Marco Maratea, and Francesco Ricca. The seventh answer set programming competition: Design and results. Theory Pract. Log. Pro- gram., 20(2):176-204, 2020.
  23. [Gelfond and Lifschitz, 1988] Michael Gelfond and Vladimir Lifschitz. The stable model semantics for logic programming. In ICLP/SLP, pages 1070-1080.
  24. [Gelfond and Lifschitz, 1991] Michael Gelfond and Vladimir Lifschitz. Classical negation in logic pro- grams and disjunctive databases. New Gener. Comput., 9(3/4):365-386, 1991.
  25. [Hahn et al., 2023] Susana Hahn, Orkunt Sabuncu, Torsten Schaub, and Tobias Stolzmann. Clingraph: A system for asp-based visualization. CoRR, abs/2303.10118, 2023.
  26. [Hua and Wang, 2020] Xinyu Hua and Lu Wang. PAIR: planning and iterative refinement in pre-trained transform- ers for long text generation. CoRR, abs/2010.02301, 2020.
  27. [Ishay et al., 2023] Adam Ishay, Zhun Yang, and Joohyung Lee. Leveraging large language models to generate answer set programs. In KR, pages 374-383, 2023.
  28. [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, 2nd Edition. Prentice Hall series in artificial intelligence. Prentice Hall, Pearson Education International, 2009.
  29. [Kalliamvakou, 2022] Eirini Kalliamvakou. Research: quan- tifying github copilot's impact on developer productivity and happiness. The GitHub Blog, 2022.
  30. [Kuhn, 2014] Tobias Kuhn. A survey and classification of controlled natural languages. Comput. Linguistics, 40(1):121-170, 2014.
  31. [Lewis et al., 2019] Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. BART: de- noising sequence-to-sequence pre-training for natural lan- guage generation, translation, and comprehension. CoRR, abs/1910.13461, 2019.
  32. [Lierler et al., 2016] Yuliya Lierler, Marco Maratea, and Francesco Ricca. Systems, engineering environments, and competitions. AI Mag., 37(3):45-52, 2016.
  33. [Lifschitz, 2019] Vladimir Lifschitz. Answer Set Program- ming. Springer, 2019.
  34. [Lifschitz, 2022] Vladimir Lifschitz. Translating definitions into the language of logic programming: A case study. In ICLP Workshops, volume 3193 of CEUR WP. CEUR- WS.org, 2022.
  35. [Mitra and Baral, 2016] Arindam Mitra and Chitta Baral. Addressing a question answering challenge by combining statistical methods with inductive rule learning and reason- ing. In AAAI, pages 2779-2785. AAAI Press, 2016.
  36. [Moldovan et al., 2003] Dan I. Moldovan, Christine Clark, Sanda M. Harabagiu, and Steven J. Maiorano. COGEX: A logic prover for question answering. In HLT-NAACL. The Association for Computational Linguistics, 2003.
  37. [Nye et al., 2021] Maxwell I. Nye, Michael Henry Tessler, Joshua B. Tenenbaum, and Brenden M. Lake. Improv- ing coherence and consistency in neural sequence models with dual-system, neuro-symbolic reasoning. In NeurIPS, pages 25192-25204, 2021.
  38. [Papineni et al., 2002] Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for au- tomatic evaluation of machine translation. In ACL, pages 311-318. ACL, 2002.
  39. [Peng et al., 2023] Sida Peng, Eirini Kalliamvakou, Peter Cihon, and Mert Demirer. The impact of AI on devel- oper productivity: Evidence from github copilot. CoRR, abs/2302.06590, 2023.
  40. [Perevalov et al., 2022] Aleksandr Perevalov, Dennis Diefenbach, Ricardo Usbeck, and Andreas Both. Qald-9- plus: A multilingual dataset for question answering over dbpedia and wikidata translated by native speakers. In ICSC, pages 229-234. IEEE, 2022.
  41. [Raffel et al., 2020] Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res., 21:140:1-140:67, 2020.
  42. [Schwitter, 2018] Rolf Schwitter. Specifying and verbalising answer set programs in controlled natural language. The- ory Pract. Log. Program., 18(3-4):691-705, 2018.
  43. [Stahlberg, 2020] Felix Stahlberg. Neural machine transla- tion: A review. J. Artif. Intell. Res., 69:343-418, 2020.
  44. [Sutskever et al., 2014] Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. Sequence to sequence learning with neural networks. In NIPS, pages 3104-3112, 2014.
  45. [Trivedi et al., 2017] Priyansh Trivedi, Gaurav Maheshwari, Mohnish Dubey, and Jens Lehmann. Lc-quad: A corpus for complex question answering over knowledge graphs. In ISWC (2), volume 10588 of LNCS, pages 210-218. Springer, 2017.
  46. [Vos et al., 2012] Marina De Vos, Doga Gizem Kisa, Jo- hannes Oetsch, Jörg Pührer, and Hans Tompits. Anno- tating answer-set programs in lana. Theory Pract. Log. Program., 12(4-5):619-637, 2012.
  47. [Wagner, 2010] Wiebke Wagner. Steven bird, ewan klein and edward loper: Natural language processing with python, analyzing text with the natural language toolkit -o'reilly media, beijing, 2009, ISBN 978-0-596-51649-9. Lang. Resour. Evaluation, 44(4):421-424, 2010.
  48. [Xu et al., 2018] Jingjing Xu, Xuancheng Ren, Yi Zhang, Qi Zeng, Xiaoyan Cai, and Xu Sun. A skeleton-based model for promoting coherence among sentences in narra- tive story generation. In EMNLP, pages 4306-4315. ACL, 2018.
  49. [Yang et al., 2020] Shuoheng Yang, Yuxin Wang, and Xi- aowen Chu. A survey of deep learning techniques for neu- ral machine translation. CoRR, abs/2002.07526, 2020.
  50. [Yang et al., 2023] Zhun Yang, Adam Ishay, and Joohyung Lee. Coupling large language models with logic program- ming for robust and general reasoning from text. In ACL (Findings), pages 5186-5219. ACL, 2023.

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

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