SPSQL-2: Make Submodels More Adaptable to Subtasks in the Pipelined Text-to-SQL Model

Ran Shen, Gang Sun, Hao Shen, Yiling Li, Yifan Wang, Han Jiang · 2023

Text-to-SQL (converting the natural utterance into the structured query language) is an important task in the field of natural language processing (NLP). In previous works., we proposed a pipelined text-to-SQL model-SPSQL. SPSQL disassembles the text-to-SQL task into four subtasks: table selection., column selection., SQL generation., and value filling., and then completes the above subtasks in turn by a text classification submodel., a sequence labeling submodel., and two text generation submodels. However., SPSQL still has some defects that prevent the model from further improvement. Firstly., the selection of submodels lacks careful consideration., making submodels not suitable for subtasks enough. Secondly., in the process of generating similar texts using simBERT for natural utterances., there are cases of generating texts with opposite meanings. Thirdly., table/column selection models encountered situations where no table/column is selected during the inference process. Based on this., this paper proposes an advanced version: SPSQL-2. Specifically., we first adjust the corresponding submodel based on the characteristics of each subtask and the inference effects to reconstruct the model. Then., we introduce RoFormer-Sim instead of simBERT to generate similar text of natural utterances. Finally., we construct the “prevent empty table” module and “prevent empty column” module., and insert them into the table selection submodel and column selection submodel respectively. The insertion of these modules prevents the occurrence of no table or column being selected during the inference process. In addition., we construct the dataset based on the power dispatch and control data of the State Grid Corporation of China. Experiments demonstrate our measures in model construction., data augmentation., and (table and column selection) submodel optimization effectively improve the effect of the original model.

Read the paper · More papers on PaperTik