Semantic Path Attention Network Based on Heterogeneous Graphs for Natural Language to SQL Task - ZHOU Haoran; SONG Hui; GONG Mengmeng (东华大学学报（英文版）, 2023)
TP391.1; The natural language to SQL(NL2SQL)task is an emerging research area that aims to transform a natural language with a given database into an SQL query.The earlier approaches were to process the input into a heterogeneous graph.However,previous models failed to distinguish the types of multi-hop connections of the heterogeneous graph,which tended to ignore crucial semantic path information.To this end,a two-layer attention network is presented to focus on essential neighbor nodes and mine enlightening semantic paths for feature encoding.The weighted edge is introduced for schema linking to connect the nodes with semantic similarity.In the decoding phase,a rule-based pruning strategy is offered to refine the generated SQL queries.From the experimental results,the approach is shown to learn a good encoding representation and decode the representation to generate results with practical meaning.