{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/sqlnet-generating-structured-queries-from","title":"SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learning","arxiv_id":"1711.04436","date":"2017-11-13","proceeding":"ICLR 2018 1","authors":["Xiaojun Xu","Chang Liu","Dawn Song"],"abstract":"Synthesizing SQL queries from natural language is a long-standing open\nproblem and has been attracting considerable interest recently. Toward solving\nthe problem, the de facto approach is to employ a sequence-to-sequence-style\nmodel. Such an approach will necessarily require the SQL queries to be\nserialized. Since the same SQL query may have multiple equivalent\nserializations, training a sequence-to-sequence-style model is sensitive to the\nchoice from one of them. This phenomenon is documented as the \"order-matters\"\nproblem. Existing state-of-the-art approaches rely on reinforcement learning to\nreward the decoder when it generates any of the equivalent serializations.\nHowever, we observe that the improvement from reinforcement learning is\nlimited.\n  In this paper, we propose a novel approach, i.e., SQLNet, to fundamentally\nsolve this problem by avoiding the sequence-to-sequence structure when the\norder does not matter. In particular, we employ a sketch-based approach where\nthe sketch contains a dependency graph so that one prediction can be done by\ntaking into consideration only the previous predictions that it depends on. In\naddition, we propose a sequence-to-set model as well as the column attention\nmechanism to synthesize the query based on the sketch. By combining all these\nnovel techniques, we show that SQLNet can outperform the prior art by 9% to 13%\non the WikiSQL task.","url_abs":"http://arxiv.org/abs/1711.04436v1","url_pdf":"http://arxiv.org/pdf/1711.04436v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"sqlnet-generating-structured-queries-from","repo_url":"https://github.com/Baidi96/text2sql","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"paper_slug":"sqlnet-generating-structured-queries-from","repo_url":"https://github.com/BroCoLySTyLe/SQLovaReview","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"sqlnet-generating-structured-queries-from","repo_url":"https://github.com/CX000/sqlnet_inference_py36","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"paper_slug":"sqlnet-generating-structured-queries-from","repo_url":"https://github.com/PriyankaDatar/NLP_Project_Modfications","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"paper_slug":"sqlnet-generating-structured-queries-from","repo_url":"https://github.com/PriyankaDatar/NLP_SQL_Bert","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"sqlnet-generating-structured-queries-from","repo_url":"https://github.com/PriyankaDatar/NLP_SQL_Project","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"paper_slug":"sqlnet-generating-structured-queries-from","repo_url":"https://github.com/PriyankaDatar/NLP_project_BIDAF","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"sqlnet-generating-structured-queries-from","repo_url":"https://github.com/abhishekchugh17/sql12","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"paper_slug":"sqlnet-generating-structured-queries-from","repo_url":"https://github.com/llSourcell/SQL_Database_Optimization","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"paper_slug":"sqlnet-generating-structured-queries-from","repo_url":"https://github.com/racheljose21/chatbot","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"paper_slug":"sqlnet-generating-structured-queries-from","repo_url":"https://github.com/salesforce/WikiSQL","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"paper_slug":"sqlnet-generating-structured-queries-from","repo_url":"https://github.com/wronnyhuang/SQLNet_inference","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"paper_slug":"sqlnet-generating-structured-queries-from","repo_url":"https://github.com/xiaojunxu/SQLNet","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"reinforcement-learning","task_name":"Reinforcement Learning"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"},{"task_slug":"text-to-sql","task_name":"Text-To-SQL"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1711.04436","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1711.04436"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/BroCoLySTyLe/SQLovaReview","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/CX000/sqlnet_inference_py36","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/wronnyhuang/SQLNet_inference","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Baidi96/text2sql","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/abhishekchugh17/sql12","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/xiaojunxu/SQLNet","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/salesforce/WikiSQL","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/llSourcell/SQL_Database_Optimization","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/racheljose21/chatbot","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/PriyankaDatar/NLP_project_BIDAF","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/PriyankaDatar/NLP_SQL_Bert","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/PriyankaDatar/NLP_SQL_Project","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/PriyankaDatar/NLP_Project_Modfications","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"summary":{"ran_draft_wrong":1,"ran_fixture":2,"ran_honours":1,"unverified":15},"by_repo_kind":{"listed":{"samples":19,"ran":4,"repositories":5}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"d74e5a33a9136d0d","entry":"att_flow_layer","repo":"PriyankaDatar/NLP_project_BIDAF","repo_kind":"listed","path":"sqlnet/model/modules/net_utils.py","file_url":"https://github.com/PriyankaDatar/NLP_project_BIDAF/blob/HEAD/sqlnet/model/modules/net_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"d74e5a33a9136d0d"}},{"code_sha256_prefix":"f2b7fb04ad23ccb2","entry":"col_name_encode","repo":"PriyankaDatar/NLP_project_BIDAF","repo_kind":"listed","path":"sqlnet/model/modules/net_utils.py","file_url":"https://github.com/PriyankaDatar/NLP_project_BIDAF/blob/HEAD/sqlnet/model/modules/net_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"f2b7fb04ad23ccb2"}},{"code_sha256_prefix":"a05f53e403297257","entry":"run_lstm","repo":"PriyankaDatar/NLP_project_BIDAF","repo_kind":"listed","path":"sqlnet/model/modules/net_utils.py","file_url":"https://github.com/PriyankaDatar/NLP_project_BIDAF/blob/HEAD/sqlnet/model/modules/net_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"a05f53e403297257"}},{"code_sha256_prefix":"d95385178f502fa2","entry":"variable","repo":"CX000/sqlnet_inference_py36","repo_kind":"listed","path":"ewc.py","file_url":"https://github.com/CX000/sqlnet_inference_py36/blob/HEAD/ewc.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"d95385178f502fa2"}},{"code_sha256_prefix":"17e87858aaa02d44","entry":"best_model_name","repo":"Baidi96/text2sql","repo_kind":"listed","path":"sqlnet/utils.py","file_url":"https://github.com/Baidi96/text2sql/blob/HEAD/sqlnet/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"17e87858aaa02d44"}},{"code_sha256_prefix":"6aaa6080fafbce8a","entry":"check_acc","repo":"Baidi96/text2sql","repo_kind":"listed","path":"check_acc/check_acc.py","file_url":"https://github.com/Baidi96/text2sql/blob/HEAD/check_acc/check_acc.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"6aaa6080fafbce8a"}},{"code_sha256_prefix":"0d171b3704b19708","entry":"col_name_encode","repo":"Baidi96/text2sql","repo_kind":"listed","path":"sqlnet/model/modules/net_utils.py","file_url":"https://github.com/Baidi96/text2sql/blob/HEAD/sqlnet/model/modules/net_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"0d171b3704b19708"}},{"code_sha256_prefix":"477cb473548b1048","entry":"col_name_encode","repo":"CX000/sqlnet_inference_py36","repo_kind":"listed","path":"sqlnet/model/modules/net_utils.py","file_url":"https://github.com/CX000/sqlnet_inference_py36/blob/HEAD/sqlnet/model/modules/net_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"477cb473548b1048"}},{"code_sha256_prefix":"051d5e10e30db060","entry":"ewc_train","repo":"CX000/sqlnet_inference_py36","repo_kind":"listed","path":"ewc.py","file_url":"https://github.com/CX000/sqlnet_inference_py36/blob/HEAD/ewc.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"051d5e10e30db060"}},{"code_sha256_prefix":"d6fe93cd33bdc370","entry":"load_data","repo":"Baidi96/text2sql","repo_kind":"listed","path":"sqlnet/utils.py","file_url":"https://github.com/Baidi96/text2sql/blob/HEAD/sqlnet/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"d6fe93cd33bdc370"}},{"code_sha256_prefix":"76114d4f76721e22","entry":"load_data","repo":"CX000/sqlnet_inference_py36","repo_kind":"listed","path":"sqlnet/utils.py","file_url":"https://github.com/CX000/sqlnet_inference_py36/blob/HEAD/sqlnet/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"76114d4f76721e22"}},{"code_sha256_prefix":"9c57d0d5b33162aa","entry":"load_data","repo":"PriyankaDatar/NLP_SQL_Project","repo_kind":"listed","path":"sqlnet/utils.py","file_url":"https://github.com/PriyankaDatar/NLP_SQL_Project/blob/HEAD/sqlnet/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"9c57d0d5b33162aa"}},{"code_sha256_prefix":"e02e4d6dd9d1c2ce","entry":"load_dataset","repo":"Baidi96/text2sql","repo_kind":"listed","path":"sqlnet/utils.py","file_url":"https://github.com/Baidi96/text2sql/blob/HEAD/sqlnet/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"e02e4d6dd9d1c2ce"}},{"code_sha256_prefix":"43888b7a46c23bcf","entry":"load_dataset","repo":"CX000/sqlnet_inference_py36","repo_kind":"listed","path":"sqlnet/utils.py","file_url":"https://github.com/CX000/sqlnet_inference_py36/blob/HEAD/sqlnet/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"43888b7a46c23bcf"}},{"code_sha256_prefix":"7172d1aead4de6bd","entry":"load_dataset","repo":"PriyankaDatar/NLP_SQL_Project","repo_kind":"listed","path":"sqlnet/utils.py","file_url":"https://github.com/PriyankaDatar/NLP_SQL_Project/blob/HEAD/sqlnet/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"7172d1aead4de6bd"}},{"code_sha256_prefix":"be979946e6e72c09","entry":"load_dataset_dummy","repo":"CX000/sqlnet_inference_py36","repo_kind":"listed","path":"sqlnet/utils.py","file_url":"https://github.com/CX000/sqlnet_inference_py36/blob/HEAD/sqlnet/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"be979946e6e72c09"}},{"code_sha256_prefix":"61d0dcf14b7919a6","entry":"normal_train","repo":"CX000/sqlnet_inference_py36","repo_kind":"listed","path":"ewc.py","file_url":"https://github.com/CX000/sqlnet_inference_py36/blob/HEAD/ewc.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"61d0dcf14b7919a6"}},{"code_sha256_prefix":"6dc375fd6ccbbc87","entry":"run_GRU","repo":"PriyankaDatar/NLP_Project_Modfications","repo_kind":"listed","path":"sqlnet/model/modules/net_utils.py","file_url":"https://github.com/PriyankaDatar/NLP_Project_Modfications/blob/HEAD/sqlnet/model/modules/net_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"6dc375fd6ccbbc87"}},{"code_sha256_prefix":"9a2f05c9b4e0a6ed","entry":"run_lstm","repo":"Baidi96/text2sql","repo_kind":"listed","path":"sqlnet/model/modules/net_utils.py","file_url":"https://github.com/Baidi96/text2sql/blob/HEAD/sqlnet/model/modules/net_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"9a2f05c9b4e0a6ed"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}