Papers › SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learning

SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learning

13 Nov 2017ICLR 2018 1arXiv:1711.04436archive 2025-07-28

Xiaojun Xu, Chang Liu, Dawn Song

Synthesizing SQL queries from natural language is a long-standing open problem and has been attracting considerable interest recently. Toward solving the problem, the de facto approach is to employ a sequence-to-sequence-style model. Such an approach will necessarily require the SQL queries to be serialized. Since the same SQL query may have multiple equivalent serializations, training a sequence-to-sequence-style model is sensitive to the choice from one of them. This phenomenon is documented as the "order-matters" problem. Existing state-of-the-art approaches rely on reinforcement learning to reward the decoder when it generates any of the equivalent serializations. However, we observe that the improvement from reinforcement learning is limited. In this paper, we propose a novel approach, i.e., SQLNet, to fundamentally solve this problem by avoiding the sequence-to-sequence structure when the order does not matter. In particular, we employ a sketch-based approach where the sketch contains a dependency graph so that one prediction can be done by taking into consideration only the previous predictions that it depends on. In addition, we propose a sequence-to-set model as well as the column attention mechanism to synthesize the query based on the sketch. By combining all these novel techniques, we show that SQLNet can outperform the prior art by 9% to 13% on the WikiSQL task.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1711.04436")

Code

Syntology Ran 4 of 19 code samples harvested from 5 repositories linked to this paper; 15 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · our draft was wrong; 2 ran · fixture could not drive it.

By repository: community (archive-listed): 19 samples from 5 repositories, 4 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

13 repositories listed; official and paper-mentioned ones first.

Baidi96/text2sql mentioned on GitHubpytorchBSD-3-Clause report
BroCoLySTyLe/SQLovaReview mentioned on GitHub report
CX000/sqlnet_inference_py36 mentioned on GitHubpytorchBSD-3-Clause report
PriyankaDatar/NLP_Project_Modfications mentioned on GitHubpytorchBSD-3-Clause report
PriyankaDatar/NLP_SQL_Bert mentioned on GitHubpytorch report
PriyankaDatar/NLP_SQL_Project mentioned on GitHubpytorchBSD-3-Clause report
PriyankaDatar/NLP_project_BIDAF mentioned on GitHubpytorch report
abhishekchugh17/sql12 mentioned on GitHubpytorchBSD-3-Clause report
llSourcell/SQL_Database_Optimization mentioned on GitHubpytorchBSD-3-Clause report
racheljose21/chatbot mentioned on GitHubpytorchBSD-3-Clause report
salesforce/WikiSQL mentioned on GitHubBSD-3-Clause report
wronnyhuang/SQLNet_inference mentioned on GitHubpytorchBSD-3-Clause report
xiaojunxu/SQLNet mentioned on GitHubpytorchBSD-3-Clause report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

19 samples harvested; 4 ran; 1 honoured the contract we drafted; 15 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · our draft was wrong
2ran · fixture could not drive it
15unverified

Licence: 0 of the 19 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 5 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

att_flow_layer PriyankaDatar/NLP_project_BIDAF/sqlnet/model/modules/net_utils.py community (archive-listed) ran · our draft was wrong BSD-3-Clause (permissive) · d74e5a33a9136d0d · report
col_name_encode PriyankaDatar/NLP_project_BIDAF/sqlnet/model/modules/net_utils.py community (archive-listed) ran · fixture could not drive it BSD-3-Clause (permissive) · f2b7fb04ad23ccb2 · report
run_lstm PriyankaDatar/NLP_project_BIDAF/sqlnet/model/modules/net_utils.py community (archive-listed) ran · fixture could not drive it BSD-3-Clause (permissive) · a05f53e403297257 · report
variable CX000/sqlnet_inference_py36/ewc.py community (archive-listed) ran · honoured contract fingerprinted BSD-3-Clause (permissive) · d95385178f502fa2 · report
best_model_name Baidi96/text2sql/sqlnet/utils.py community (archive-listed) unverified BSD-3-Clause (permissive) · 17e87858aaa02d44 · report
check_acc Baidi96/text2sql/check_acc/check_acc.py community (archive-listed) unverified BSD-3-Clause (permissive) · 6aaa6080fafbce8a · report
col_name_encode Baidi96/text2sql/sqlnet/model/modules/net_utils.py community (archive-listed) unverified BSD-3-Clause (permissive) · 0d171b3704b19708 · report
col_name_encode CX000/sqlnet_inference_py36/sqlnet/model/modules/net_utils.py community (archive-listed) unverified BSD-3-Clause (permissive) · 477cb473548b1048 · report
ewc_train CX000/sqlnet_inference_py36/ewc.py community (archive-listed) unverified BSD-3-Clause (permissive) · 051d5e10e30db060 · report
load_data Baidi96/text2sql/sqlnet/utils.py community (archive-listed) unverified BSD-3-Clause (permissive) · d6fe93cd33bdc370 · report
load_data CX000/sqlnet_inference_py36/sqlnet/utils.py community (archive-listed) unverified BSD-3-Clause (permissive) · 76114d4f76721e22 · report
load_data PriyankaDatar/NLP_SQL_Project/sqlnet/utils.py community (archive-listed) unverified BSD-3-Clause (permissive) · 9c57d0d5b33162aa · report
load_dataset Baidi96/text2sql/sqlnet/utils.py community (archive-listed) unverified BSD-3-Clause (permissive) · e02e4d6dd9d1c2ce · report
load_dataset CX000/sqlnet_inference_py36/sqlnet/utils.py community (archive-listed) unverified BSD-3-Clause (permissive) · 43888b7a46c23bcf · report
load_dataset PriyankaDatar/NLP_SQL_Project/sqlnet/utils.py community (archive-listed) unverified BSD-3-Clause (permissive) · 7172d1aead4de6bd · report
load_dataset_dummy CX000/sqlnet_inference_py36/sqlnet/utils.py community (archive-listed) unverified BSD-3-Clause (permissive) · be979946e6e72c09 · report
normal_train CX000/sqlnet_inference_py36/ewc.py community (archive-listed) unverified BSD-3-Clause (permissive) · 61d0dcf14b7919a6 · report
run_GRU PriyankaDatar/NLP_Project_Modfications/sqlnet/model/modules/net_utils.py community (archive-listed) unverified BSD-3-Clause (permissive) · 6dc375fd6ccbbc87 · report
run_lstm Baidi96/text2sql/sqlnet/model/modules/net_utils.py community (archive-listed) unverified BSD-3-Clause (permissive) · 9a2f05c9b4e0a6ed · report

Tasks

DecoderReinforcement LearningReinforcement Learning (RL)Text-To-SQLreinforcement-learning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections