An Encoder-Decoder Framework Translating Natural Language to Database Queries

  • 2018-06-09 07:38:27
  • Ruichu Cai, Boyan Xu, Xiaoyan Yang, Zhenjie Zhang, Zijian Li, Zhihao Liang
  • 0

Abstract

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

 

Quick Read (beta)

loading the full paper ...