Proceedings

An Encoder-Decoder Framework Translating Natural Language to Database Queries

Download BibTeX Cite

Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence. Main track. Pages 3977-3983.

https://doi.org/10.24963/ijcai.2018/553

Abstract

Machine translation is going through a radical revolution, driven by the explosive development of deep learning techniques using Convolutional Neural Network (CNN) and Recurrent Neural Network (RNN). In this paper, we consider a special case in machine translation problems, targeting to convert natural language into Structured Query Language (SQL) for data retrieval over relational database. Although generic CNN and RNN learn the grammar structure of SQL when trained with sufficient samples, the accuracy and training efficiency of the model could be dramatically improved, when the translation model is deeply integrated with the grammar rules of SQL. We present a new encoder-decoder framework, with a suite of new approaches, including new semantic features fed into the encoder, grammar-aware states injected into the memory of decoder, as well as recursive state management for sub-queries. These techniques help the neural network better focus on understanding semantics of operations in natural language and save the efforts on SQL grammar learning. The empirical evaluation on real world database and queries show that our approach outperform state-of-the-art solution by a significant margin.

  1. [Castano et al., 1997] M Asunción Castano, Francisco Casacuberta, and Enrique Vidal. Machine translation using neural networks and finite-state models. Theoretical and Methodological Issues in Machine Translation, pages 160-167, 1997.
  2. [Cho et al., 2014] Kyunghyun Cho, Bart Van Merriënboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014.
  3. [Dong and Lapata, 2016] Li Dong and Mirella Lapata. Lan- guage to logical form with neural attention. In ACL, 2016.
  4. [Gehring et al., 2017] Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann N. Dauphin. Convo- lutional sequence to sequence learning. In ICML, pages 1243-1252, 2017.
  5. [Giordani and Moschitti, 2012] Alessandra Giordani and Alessandro Moschitti. Translating questions to SQL queries with generative parsers discriminatively reranked. In COLING, pages 401-410, 2012.
  6. [Guu et al., 2017] Kelvin Guu, Panupong Pasupat, Evan Zheran Liu, and Percy Liang. From language to programs: Bridging reinforcement learning and maximum marginal likelihood. In ACL, 2017.
  7. [Hochreiter and Schmidhuber, 1997] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735-1780, 1997.
  8. [Iyer et al., 2017] Srinivasan Iyer, Ioannis Konstas, Alvin Cheung, Jayant Krishnamurthy, and Luke Zettlemoyer. Learning a neural semantic parser from user feedback. In ACL, pages 963-973, 2017.
  9. [Jia and Liang, 2016] Robin Jia and Percy Liang. Data re- combination for neural semantic parsing. In ACL, 2016.
  10. [Koncar and Guthrie, 1997] Nenad Koncar and Gregory Guthrie. A natural language translation neural network. In New Methods in Language Processing, pages 219-228, 1997.
  11. [Lafferty et al., 2001] John Lafferty, Andrew McCallum, Fernando Pereira, et al. Conditional random fields: Proba- bilistic models for segmenting and labeling sequence data. In ICML, volume 1, pages 282-289, 2001.
  12. [Li and Jagadish, 2014] Fei Li and HV Jagadish. Construct- ing an interactive natural language interface for relational databases. Proceedings of the VLDB Endowment, 8(1):73- 84, 2014.
  13. [Liang et al., 2017] Chen Liang, Jonathan Berant, Quoc Le, Kenneth D. Forbus, and Ni Lao. Neural symbolic ma- chines: Learning semantic parsers on freebase with weak supervision. In ACL, pages 23-33, 2017.
  14. [Liang, 2016] Percy Liang. Learning executable semantic parsers for natural language understanding. Communica- tions of ACM, 59(9):68-76, 2016.
  15. [Long et al., 2016] Reginald Long, Panupong Pasupat, and Percy Liang. Simpler context-dependent logical forms via model projections. In ACL, 2016.
  16. [Mikolov et al., 2013] Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed rep- resentations of words and phrases and their composition- ality. In NIPS, pages 3111-3119, 2013.
  17. [Mou et al., 2017] Lili Mou, Zhengdong Lu, Hang Li, and Zhi Jin. Coupling distributed and symbolic execution for natural language queries. In ICML, pages 2518-2526, 2017.
  18. [Neelakantan et al., 2016] Arvind Neelakantan, Quoc V Le, Martin Abadi, Andrew McCallum, and Dario Amodei. Learning a natural language interface with neural pro- grammer. arXiv preprint arXiv:1611.08945, 2016.
  19. [Popescu et al., 2003] Ana-Maria Popescu, Oren Etzioni, and Henry A. Kautz. Towards a theory of natural language interfaces to databases. In IUI, pages 149-157, 2003.
  20. [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.
  21. [Roy et al., 2013] Senjuti Basu Roy, Martine De Cock, Vani Mandava, Swapna Savanna, Brian Dalessandro, Claudia Perlich, William Cukierski, and Ben Hamner. The mi- crosoft academic search dataset and kdd cup 2013. In KDD Cup 2013, page 1, 2013.
  22. [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.
  23. [Wu et al., 2016] Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. Google's neural machine translation sys- tem: Bridging the gap between human and machine trans- lation. arXiv preprint arXiv:1609.08144, 2016.
  24. [Xiao et al., 2016] Chunyang Xiao, Marc Dymetman, and Claire Gardent. Sequence-based structured prediction for semantic parsing. ACL, 2016.
  25. [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.
  26. [Yin et al., 2016] Pengcheng Yin, Zhengdong Lu, Hang Li, and Ben Kao. Neural enquirer: Learning to query tables in natural language. In IJCAI, pages 2308-2314, 2016. IJCAI
  27. [Zhou et al., 2016] Jie Zhou, Ying Cao, Xuguang Wang, Peng Li, and Wei Xu. Deep recurrent models with fast- forward connections for neural machine translation. TACL, 4:371-383, 2016.

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

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