Proceedings

Correct and Optimal: The Regular Expression Inference Challenge

Download BibTeX Cite

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

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

Abstract

We propose regular expression inference (REI) as a challenge for code/language modelling, and the wider machine learning community. REI is a supervised machine learning (ML) and program optimisation task, and poses the problem of finding minimal regular expressions from examples: Given two finite sets of strings P and N and a cost function cost(·), the task is to generate an expression r that accepts all strings in P and rejects all strings in N , while no other such expression r′ exists with cost(r′) < cost(r).

REI has advantages as a challenge problem: (i) regular expressions are well-known, widely used, and a natural idealisation of code; (ii) REI’s asymptotic worst-case complexity is well understood; (iii) REI has a small number of easy to understand parameters (e.g. P or N cardinality, string lengths of examples, or the cost function); this lets us easily finetune REI-hardness; (iv) REI, with its emphasis on optimisation, is an unsolved problem for deep learning based ML.

Recently, an REI solver was implemented on GPUs, using program synthesis techniques. This enabled, for the first time, fast generation of minimal regular expressions for complex REI instances. Building on this advance, we generate and publish the first large-scale datasets for REI, and devise and evaluate several initial heuristic and machine learning baselines.

We invite the community to participate and explore ML methods that learn to solve REI problems. We believe that progress in REI directly translates to progress in code/language modelling.

  1. [Angluin, 1978] Dana Angluin. On the complexity of mini- mum inference of regular sets. Information and Control, 39(3):337-350, 1978.
  2. [Angluin, 1987] Dana Angluin. Learning Regular Sets from Queries and Counterexamples. Inf. Comput., 75(2):87-106, November 1987.
  3. [Austin et al., 2021] Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, et al. Program synthesis with large language models. arXiv preprint arXiv:2108.07732, 2021.
  4. [Bowman et al., 2015] Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. A large annotated corpus for learning natural language inference. In Proceedings of EMNLP 2015, pages 632-642, Lisbon, Portugal, September 2015.
  5. [Brown et al., 2020] Tom Brown, Benjamin Mann, Nick Ry- der, Melanie Subbiah, Jared D Kaplan, Prafulla Dhari- wal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. Advances in neural information processing sys- tems, 33:1877-1901, 2020.
  6. [Budzianowski et al., 2018] Paweł Budzianowski, Tsung- Hsien Wen, Bo-Hsiang Tseng, Iñigo Casanueva, Stefan Ultes, Osman Ramadan, and Milica Gašić. MultiWOZ - a large-scale multi-domain Wizard-of-Oz dataset for task- oriented dialogue modelling. In Proceedings of EMNLP 2018, pages 5016-5026, Brussels, Belgium, October- November 2018.
  7. [Chen et al., 2021] Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021.
  8. [Chen et al., 2023] Qiaochu Chen, Arko Banerjee, C ¸agatay Demiralp, Greg Durrett, and Is ¸ıl Dillig. Data extraction via semantic regular expression synthesis. Proc. ACM Pro- gram. Lang., 7(OOPSLA2), oct 2023.
  9. [Chomsky, 1956] Noam Chomsky. Three models for the de- scription of language. IRE Transactions on information theory, 2(3):113-124, 1956.
  10. [Colin et al., 2016] Emilie Colin, Claire Gardent, Yassine M'rabet, Shashi Narayan, and Laura Perez-Beltrachini. The WebNLG Challenge: Generating Text from DBPedia Data. In Proceedings of the 9th international natural lan- guage generation conference, pages 163-167, 2016.
  11. [Courcelle and Engelfriet, 2012] Professor Bruno Courcelle and Dr Joost Engelfriet. Graph Structure and Monadic Second-Order Logic: A Language-Theoretic Approach. Cambridge University Press, USA, 1st edition, 2012.
  12. [Delétang et al., 2023] Grégoire Delétang, Anian Ruoss, Jordi Grau-Moya, Tim Genewein, Li Kevin Wenliang, El- liot Catt, Chris Cundy, Marcus Hutter, Shane Legg, Joel Veness, and Pedro A. Ortega. Neural networks and the chomsky hierarchy. In 11th International Conference on Learning Representations, 2023.
  13. [D'Ulizia et al., 2011] Arianna D'Ulizia, Fernando Ferri, and Patrizia Grifoni. A survey of grammatical inference methods for natural language learning. Artificial Intelli- gence Review, 36:1-27, 2011.
  14. [Firoiu et al., 1998] Laura Firoiu, Tim Oates, and Paul R. Cohen. Learning Deterministic Finite Automaton with a Recurrent Neural Network. In Proceedings of the ICGI 1998, ICGI '98, page 90-101, Berlin, Heidelberg, 1998. Springer-Verlag. [Github, 2022] Github. Your AI pair programmer. https:// github.com/features/copilot, 2022. Blog post accessed 8 June 2023. Link
  15. [Gold, 1967] E. Mark Gold. Language identification in the limit. Information and Control, 10(5):447-474, 1967.
  16. [Gold, 1978] E. Mark Gold. Complexity of automaton iden- tification from given data. Information and Control, 37(3):302-320, 1978.
  17. [Guan et al., 2021] Jian Guan, Zhexin Zhang, Zhuoer Feng, Zitao Liu, Wenbiao Ding, Xiaoxi Mao, Changjie Fan, and Minlie Huang. OpenMEVA: A benchmark for evaluating open-ended story generation metrics. In Proceedings of the 59th Annual Meeting of the Association for Computa- tional Linguistics and the 11th International Joint Confer- ence on Natural Language Processing (Volume 1: Long Papers), pages 6394-6407, Online, August 2021.
  18. [Hendrycks et al., 2021] Dan Hendrycks, Steven Basart, Saurav Kadavath, Mantas Mazeika, Akul Arora, Ethan Guo, Collin Burns, Samir Puranik, Horace He, Dawn Song, and Jacob Steinhardt. Measuring coding challenge competence with apps. NeurIPS, 2021.
  19. [Holtzman et al., 2019] Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, and Yejin Choi. The curious case of neural text degeneration. In International Conference on Learning Representations, 2019.
  20. [Hopcroft et al., 2006] John E. Hopcroft, Rajeev Motwani, and Jeffrey D. Ullman. Introduction to Automata Theory, Languages, and Computation. Addison-Wesley, 2006.
  21. [Kearns and Valiant, 1994] Michael Kearns and Leslie Valiant. Cryptographic Limitations on Learning Boolean Formulae and Finite Automata. J. ACM, 41(1):67-95, jan 1994.
  22. [Kleene, 1956] S. C. Kleene. Representation of events in nerve nets and finite automata. In Automata Studies, pages 3-41. Princeton University Press, Princeton, NJ, 1956.
  23. [Li et al., 2021] Yeting Li, Shuaimin Li, Zhiwu Xu, Jialun Cao, Zixuan Chen, Yun Hu, Haiming Chen, and Shing-Chi Cheung. TransRegex: Multi-Modal Regular Expression Synthesis by Generate-and-Repair. In Proceedings of the 43rd International Conference on Software Engineering, ICSE '21, page 1210-1222. IEEE Press, 2021.
  24. [Li et al., 2023] Raymond Li, Loubna Ben Allal, Yang- tian Zi, Niklas Muennighoff, Denis Kocetkov, Cheng- hao Mou, Marc Marone, Christopher Akiki, Jia Li, Jenny Chim, Qian Liu, Evgenii Zheltonozhskii, Terry Yue Zhuo, Thomas Wang, Olivier Dehaene, Mishig Davaadorj, Joel Lamy-Poirier, João Monteiro, Oleh Shliazhko, Nicolas Gontier, Nicholas Meade, Armel Zebaze, Ming-Ho Yee, Logesh Kumar Umapathi, Jian Zhu, Benjamin Lipkin, Muhtasham Oblokulov, Zhiruo Wang, Rudra Murthy, Ja- son Stillerman, Siva Sankalp Patel, Dmitry Abulkhanov, Marco Zocca, Manan Dey, Zhihan Zhang, Nour Fahmy, Urvashi Bhattacharyya, Wenhao Yu, Swayam Singh, Sasha Luccioni, Paulo Villegas, Maxim Kunakov, Fedor Zhdanov, Manuel Romero, Tony Lee, Nadav Timor, Jen- nifer Ding, Claire Schlesinger, Hailey Schoelkopf, Jan Ebert, Tri Dao, Mayank Mishra, Alex Gu, Jennifer Robin- son, Carolyn Jane Anderson, Brendan Dolan-Gavitt, Dan- ish Contractor, Siva Reddy, Daniel Fried, Dzmitry Bah- danau, Yacine Jernite, Carlos Muñoz Ferrandis, Sean Hughes, Thomas Wolf, Arjun Guha, Leandro von Werra, and Harm de Vries. Starcoder: may the source be with you! Transactions on Machine Learning Research, 2023.
  25. [Locascio et al., 2016] Nicholas Locascio, Karthik Narasimhan, Eduardo DeLeon, Nate Kushman, and Regina Barzilay. Neural generation of regular expressions from natural language with minimal domain knowledge. In Proceedings of EMNLP 2016, pages 1918-1923, Austin, Texas, November 2016.
  26. [Muralidaran et al., 2021] Vigneshwaran Muralidaran, Irena Spasić, and Dawn Knight. A systematic review of unsu- pervised approaches to grammar induction. Natural Lan- guage Engineering, 27(6):647-689, 2021.
  27. [Nie et al., 2020] Yixin Nie, Adina Williams, Emily Dinan, Mohit Bansal, Jason Weston, and Douwe Kiela. Adver- sarial NLI: A new benchmark for natural language under- standing. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4885- 4901, Online, July 2020.
  28. [OpenAI, 2022] OpenAI. Introducing ChatGPT. https: //openai.com/blog/chatgpt, 2022. Blog post published November 30, 2022. Link
  29. [Park et al., 2019] Jun-U Park, Sang-Ki Ko, Marco Cognetta, and Yo-Sub Han. SoftRegex: Generating Regex from Natural Language Descriptions using Softened Regex Equivalence. In Proceedings of EMNLP- IJCNLP 2019, pages 6425-6431, Hong Kong, China, November 2019.
  30. [Pavao et al., 2022] Adrien Pavao, Isabelle Guyon, Anne- Catherine Letournel, Xavier Baró, Hugo Escalante, Sergio Escalera, Tyler Thomas, and Zhen Xu. CodaLab Com- petitions: An open source platform to organize scientific challenges. Technical report, 2022.
  31. [Pitt and Warmuth, 1993] Leonard Pitt and Manfred K. War- muth. The Minimum Consistent DFA Problem Can- not Be Approximated within Any Polynomial. J. ACM, 40(1):95-142, jan 1993.
  32. [Radford et al., 2019] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9, 2019.
  33. [Tenney et al., 2019] Ian Tenney, Dipanjan Das, and Ellie Pavlick. BERT Rediscovers the Classical NLP Pipeline. In Proceedings of the 57th Annual Meeting of the Asso- ciation for Computational Linguistics, pages 4593-4601, 2019.
  34. [Tunstall et al., 2023] Lewis Tunstall, Nathan Lambert, Nazneen Rajani, Edward Beeching, Teven Le Scao, Leandro von Werra, Sheon Han, Philipp Schmid, and Alexander Rush. Creating a coding assis- tant with starcoder. Hugging Face Blog, 2023. https://huggingface.co/blog/starchat. [Turing and others, 1936] Link
  35. Alan Mathison Turing et al. On computable numbers, with an application to the entschei- dungsproblem. J. of Math, 58(345-363):5, 1936.
  36. [Vaandrager, 2017] Frits Vaandrager. Model Learning. Com- mun. ACM, 60(2):86-95, jan 2017.
  37. [Valizadeh and Berger, 2023] Mojtaba Valizadeh and Martin Berger. Search-Based Regular Expression Inference on a GPU. Proc. ACM Program. Lang., 7(PLDI), jun 2023. Draft available at https://arxiv.org/abs/2305.18575, imple- mentation: https://github.com/MojtabaValizadeh/paresy. Link
  38. [van der Poel et al., 2023] Sam van der Poel, Dakotah Lam- bert, Kalina Kostyszyn, Tiantian Gao, Rahul Verma, Derek Andersen, Joanne Chau, Emily Peterson, Cody St. Clair, Paul Fodor, Chihiro Shibata, and Jeffrey Heinz. ML- RegTest: A Benchmark for the Machine Learning of Reg- ular Languages, 2023.
  39. [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.
  40. [Wang et al., 2019] Alex Wang, Yada Pruksachatkun, Nikita Nangia, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. Superglue: A stick- ier benchmark for general-purpose language understand- ing systems. Advances in neural information processing systems, 32, 2019.
  41. [Williams et al., 2018] Adina Williams, Nikita Nangia, and Samuel Bowman. A broad-coverage challenge corpus for sentence understanding through inference. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 1112-1122, New Orleans, Louisiana, June 2018.
  42. [Yuie et al., 2021] Wang Yuie, Weishi Wang, Shafiq Joty, and Steven C.H. Hoi. CodeT5: Identifier-aware Uni- fied Pre-trained Encoder-Decoder Models for Code Under- standing and Generation. In EMNLP, 2021.
  43. [Zhong et al., 2018] Zexuan Zhong, Jiaqi Guo, Wei Yang, Jian Peng, Tao Xie, Jian-Guang Lou, Ting Liu, and Dong- mei Zhang. SemRegex: A Semantics-Based Approach for Generating Regular Expressions from Natural Language Specifications. In Proceedings of EMNLP 2018, pages 1608-1618, Brussels, Belgium, October-November 2018.

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

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