Proceedings

Grape: Grammar-Preserving Rule Embedding

Video #1 Video #2 Download BibTeX Cite

Proceedings of the Thirty-First International Joint Conference on Artificial Intelligence. Main Track. Pages 4545-4551.

https://doi.org/10.24963/ijcai.2022/631

Abstract

Word embedding has been widely used in various areas to boost the performance of the neural models. However, when processing context-free languages, embedding grammar rules with word embedding loses two types of information. One is the structural relationship between the grammar rules, and the other one is the content information of the rule definition.

In this paper, we make the first attempt to learn a grammar-preserving rule embedding. We first introduce a novel graph structure to represent the context-free grammar. Then, we apply a Graph Neural Network (GNN) to extract the structural information and use a gating layer to integrate content information.

We conducted experiments on six widely-used benchmarks containing four context-free languages. The results show that our approach improves the accuracy of the base model by 0.8 to 6.4 percentage points. Furthermore, Grape also achieves 1.6 F1 score improvement on the method naming task which shows the generality of our approach.

  1. [Alon et al., 2018] Uri Alon, Shaked Brody, Omer Levy, and Eran Yahav. code2seq: Generating sequences from struc- tured representations of code. In ICLR, 2018.
  2. [Alon et al., 2019] Uri Alon, Meital Zilberstein, Omer Levy, and Eran Yahav. Code2vec: Learning distributed repre- sentations of code. POPL, January 2019.
  3. [Devlin et al., 2018] Jacob Devlin, Ming-Wei Chang, Ken- ton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understand- ing. arXiv, 2018.
  4. [Dong and Lapata, 2016] Li Dong and Mirella Lapata. Lan- guage to Logical Form with Neural Attention. In ACL, pages 33-43, 2016.
  5. [Hellendoorn et al., 2020] Vincent J. Hellendoorn, Charles Sutton, Rishabh Singh, Petros Maniatis, and David Bieber. Global relational models of source code. In ICLR, 2020.
  6. [Iyer et al., 2018] Srinivasan Iyer, Ioannis Konstas, Alvin Cheung, and Luke Zettlemoyer. Mapping language to code in programmatic context. In EMNLP, pages 1643-1652, Brussels, Belgium, October-November 2018.
  7. [Kipf and Welling, 2017] Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2017.
  8. [Kwiatkowski et al., 2013] Tom Kwiatkowski, Eunsol Choi, Yoav Artzi, and Luke Zettlemoyer. Scaling semantic parsers with on-the-fly ontology matching. In EMNLP, pages 1545-1556, 2013.
  9. [Li et al., 2016] Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard S. Zemel. Gated graph sequence neural networks. In ICLR, 2016.
  10. [Liang et al., 2022] Qingyuan Liang, Qihao Zhu, Zeyu Sun, Lu Zhang, Wenjie Zhang, Yingfei Xiong, Guangtai Liang, and Lian Yu. A survey of deep learning based text-to-sql generation (in chinese). SCIS, page 1-30, 2022.
  11. [Ling et al., 2016] Wang Ling, Phil Blunsom, Edward Grefenstette, Karl Moritz Hermann, Tomáš Kočiskỳ, Fumin Wang, and Andrew Senior. Latent Predictor Net- works for Code Generation. In ACL, pages 599-609, 2016.
  12. [Lu et al., 2021] Shuai Lu, Daya Guo, et al. Codexglue: A machine learning benchmark dataset for code understand- ing and generation. In NeurIPS, 2021.
  13. [Mikolov et al., 2013] Tomas Mikolov, Kai Chen, Greg Cor- rado, and Jeffrey Dean. Efficient estimation of word rep- resentations in vector space. In ICLR, 2013.
  14. [Mou et al., 2016] Lili Mou, Ge Li, Lu Zhang, Tao Wang, and Zhi Jin. Convolutional neural networks over tree struc- tures for programming language processing. In AAAI, pages 1287-1293, 2016.
  15. [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 EMNLP-IJCNLP, pages 6425-6431, 2019.
  16. [Pennington et al., 2014] J. Pennington, R. Socher, and C. Manning. Glove: Global vectors for word represen- tation. In EMNLP, 2014.
  17. [Rabinovich et al., 2017] Maxim Rabinovich, Mitchell Stern, and Dan Klein. Abstract Syntax Networks for Code Generation and Semantic Parsing. In ACL, pages 1139-1149, 2017.
  18. [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.
  19. [Scarselli et al., 2009] F. Scarselli, M. Gori, A. C. Tsoi, M. Hagenbuchner, and G. Monfardini. The graph neural network model. TNN, 20(1):61-80, 2009.
  20. [Shaw et al., 2019] Peter Shaw, Philip Massey, Angelica Chen, Francesco Piccinno, and Yasemin Altun. Gener- ating logical forms from graph representations of text and entities. In ACL, pages 95-106, July 2019.
  21. [Sienčnik, 2015] Scharolta Katharina Sienčnik. Adapting word2vec to named entity recognition. In NODALIDA, pages 239-243, 2015.
  22. [Sun et al., 2019] Zeyu Sun, Qihao Zhu, Lili Mou, Yingfei Xiong, Ge Li, and Lu Zhang. A grammar-based structural cnn decoder for code generation. In AAAI, volume 33, pages 7055-7062, 2019.
  23. [Sun et al., 2020] Zeyu Sun, Qihao Zhu, Yingfei Xiong, Yi- can Sun, Lili Mou, and Lu Zhang. Treegen: A tree-based transformer architecture for code generation. In AAAI, vol- ume 34, pages 8984-8991, 2020.
  24. [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 NIPS, pages 6000-6010, 2017.
  25. [Wang et al., 2014] Adrienne Wang, Tom Kwiatkowski, and Luke Zettlemoyer. Morpho-syntactic lexical generaliza- tion for ccg semantic parsing. In EMNLP, pages 1284- 1295, 2014.
  26. [Wolf et al., 2014] Lior Wolf, Yair Hanani, Kfir Bar, and Nachum Dershowitz. Joint word2vec networks for bilin- gual semantic representations. IJCLA, 5(1):27-42, 2014.
  27. [Xiong et al., 2018] Yingfei Xiong, Bo Wang, Guirong Fu, and Linfei Zang. Learning to Synthesize. In GIW, 2018.
  28. [Ye et al., 2020] Xi Ye, Qiaochu Chen, Isil Dillig, and Greg Durrett. Benchmarking multimodal regex synthesis with complex structures. In ACL, pages 6081-6094, 2020.
  29. [Yin and Neubig, 2017] Pengcheng Yin and Graham Neu- big. A Syntactic Neural Model for General-Purpose Code Generation. In ACL, pages 440-450, 2017.
  30. [Yin and Neubig, 2018] Pengcheng Yin and Graham Neu- big. Tranx: A transition-based neural abstract syntax parser for semantic parsing and code generation. 10 2018.
  31. [Zhong and Mei, 2020] Hao Zhong and Hong Mei. Learning a graph-based classifier for fault localization. SCIS, 63, 06 2020.

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

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