{"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/towards-complex-text-to-sql-in-cross-domain","title":"Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representation","arxiv_id":"1905.08205","date":"2019-05-20","proceeding":"ACL 2019 7","authors":["Jiaqi Guo","Zecheng Zhan","Yan Gao","Yan Xiao","Jian-Guang Lou","Ting Liu","Dongmei Zhang"],"abstract":"We present a neural approach called IRNet for complex and cross-domain Text-to-SQL. IRNet aims to address two challenges: 1) the mismatch between intents expressed in natural language (NL) and the implementation details in SQL; 2) the challenge in predicting columns caused by the large number of out-of-domain words. Instead of end-to-end synthesizing a SQL query, IRNet decomposes the synthesis process into three phases. In the first phase, IRNet performs a schema linking over a question and a database schema. Then, IRNet adopts a grammar-based neural model to synthesize a SemQL query which is an intermediate representation that we design to bridge NL and SQL. Finally, IRNet deterministically infers a SQL query from the synthesized SemQL query with domain knowledge. On the challenging Text-to-SQL benchmark Spider, IRNet achieves 46.7% accuracy, obtaining 19.5% absolute improvement over previous state-of-the-art approaches. At the time of writing, IRNet achieves the first position on the Spider leaderboard.","url_abs":"https://arxiv.org/abs/1905.08205v2","url_pdf":"https://arxiv.org/pdf/1905.08205v2.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":"towards-complex-text-to-sql-in-cross-domain","repo_url":"https://github.com/zhanzecheng/IRNet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"towards-complex-text-to-sql-in-cross-domain","repo_url":"https://github.com/zhanzecheng/IRNet-1","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"towards-complex-text-to-sql-in-cross-domain","repo_url":"https://github.com/brunnurs/valuenet","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"towards-complex-text-to-sql-in-cross-domain","repo_url":"https://github.com/microsoft/IRNet","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"towards-complex-text-to-sql-in-cross-domain","repo_url":"https://github.com/openbotai/nl2sql","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}}],"tasks":[{"task_slug":"text-to-sql","task_name":"Text to SQL"},{"task_slug":"text-to-sql","task_name":"Text-To-SQL"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1905.08205","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1905.08205"}},"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/zhanzecheng/IRNet-1","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/openbotai/nl2sql","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/microsoft/IRNet","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zhanzecheng/IRNet","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/brunnurs/valuenet","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":20},"by_repo_kind":{"official":{"samples":12,"ran":0,"repositories":1},"listed":{"samples":8,"ran":0,"repositories":2}},"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":12,"samples":[{"code_sha256_prefix":"cfc906a590c69cbe","entry":"build_optimizer_encoder","repo":"brunnurs/valuenet","repo_kind":"listed","path":"src/optimizer.py","file_url":"https://github.com/brunnurs/valuenet/blob/HEAD/src/optimizer.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cfc906a590c69cbe"}},{"code_sha256_prefix":"6e5bb54df87a72ba","entry":"create_experiment_folder","repo":"brunnurs/valuenet","repo_kind":"listed","path":"src/utils.py","file_url":"https://github.com/brunnurs/valuenet/blob/HEAD/src/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6e5bb54df87a72ba"}},{"code_sha256_prefix":"d8099e5254807c28","entry":"dot_prod_attention","repo":"zhanzecheng/IRNet-1","repo_kind":"official","path":"src/models/nn_utils.py","file_url":"https://github.com/zhanzecheng/IRNet-1/blob/HEAD/src/models/nn_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"d8099e5254807c28"}},{"code_sha256_prefix":"e3de52f6de213f21","entry":"dot_prod_attention","repo":"brunnurs/valuenet","repo_kind":"listed","path":"src/neural_network_utils.py","file_url":"https://github.com/brunnurs/valuenet/blob/HEAD/src/neural_network_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e3de52f6de213f21"}},{"code_sha256_prefix":"286d5b153c10befb","entry":"dot_prod_attention","repo":"microsoft/IRNet","repo_kind":"listed","path":"src/models/nn_utils.py","file_url":"https://github.com/microsoft/IRNet/blob/HEAD/src/models/nn_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"286d5b153c10befb"}},{"code_sha256_prefix":"9c3576f9e3a3fead","entry":"fully_part_header","repo":"zhanzecheng/IRNet-1","repo_kind":"official","path":"preprocess/utils.py","file_url":"https://github.com/zhanzecheng/IRNet-1/blob/HEAD/preprocess/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"9c3576f9e3a3fead"}},{"code_sha256_prefix":"055bcd6f75fdf154","entry":"get_data_loader","repo":"brunnurs/valuenet","repo_kind":"listed","path":"src/data_loader.py","file_url":"https://github.com/brunnurs/valuenet/blob/HEAD/src/data_loader.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"055bcd6f75fdf154"}},{"code_sha256_prefix":"963b51dd3dc75877","entry":"get_table_colNames","repo":"zhanzecheng/IRNet-1","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/zhanzecheng/IRNet-1/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"963b51dd3dc75877"}},{"code_sha256_prefix":"9fb6cf9d7ab4b89e","entry":"group_header","repo":"zhanzecheng/IRNet-1","repo_kind":"official","path":"preprocess/utils.py","file_url":"https://github.com/zhanzecheng/IRNet-1/blob/HEAD/preprocess/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"9fb6cf9d7ab4b89e"}},{"code_sha256_prefix":"b07608731805c76b","entry":"init_config","repo":"zhanzecheng/IRNet-1","repo_kind":"official","path":"src/args.py","file_url":"https://github.com/zhanzecheng/IRNet-1/blob/HEAD/src/args.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"b07608731805c76b"}},{"code_sha256_prefix":"8652ad5cc86d0e0c","entry":"length_array_to_mask_tensor","repo":"zhanzecheng/IRNet-1","repo_kind":"official","path":"src/models/nn_utils.py","file_url":"https://github.com/zhanzecheng/IRNet-1/blob/HEAD/src/models/nn_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"8652ad5cc86d0e0c"}},{"code_sha256_prefix":"162d168370fb82c5","entry":"load_dataSets","repo":"zhanzecheng/IRNet-1","repo_kind":"official","path":"preprocess/utils.py","file_url":"https://github.com/zhanzecheng/IRNet-1/blob/HEAD/preprocess/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"162d168370fb82c5"}},{"code_sha256_prefix":"c455f0c88c1ce239","entry":"load_word_emb","repo":"zhanzecheng/IRNet-1","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/zhanzecheng/IRNet-1/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"c455f0c88c1ce239"}},{"code_sha256_prefix":"fd6641ead78d10ee","entry":"load_word_emb","repo":"brunnurs/valuenet","repo_kind":"listed","path":"src/utils.py","file_url":"https://github.com/brunnurs/valuenet/blob/HEAD/src/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fd6641ead78d10ee"}},{"code_sha256_prefix":"16fad9d730a01050","entry":"load_word_emb_binary","repo":"brunnurs/valuenet","repo_kind":"listed","path":"src/utils.py","file_url":"https://github.com/brunnurs/valuenet/blob/HEAD/src/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"16fad9d730a01050"}},{"code_sha256_prefix":"c72d53981f7830b8","entry":"lower_keys","repo":"zhanzecheng/IRNet-1","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/zhanzecheng/IRNet-1/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"c72d53981f7830b8"}},{"code_sha256_prefix":"47c4fc5b3bd99c76","entry":"make_edge","repo":"brunnurs/valuenet","repo_kind":"listed","path":"src/intermediate_representation/graph.py","file_url":"https://github.com/brunnurs/valuenet/blob/HEAD/src/intermediate_representation/graph.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"47c4fc5b3bd99c76"}},{"code_sha256_prefix":"556a6efd5f06ab91","entry":"pop_front","repo":"zhanzecheng/IRNet-1","repo_kind":"official","path":"sem2SQL.py","file_url":"https://github.com/zhanzecheng/IRNet-1/blob/HEAD/sem2SQL.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"556a6efd5f06ab91"}},{"code_sha256_prefix":"beb755eade641481","entry":"split_logical_form","repo":"zhanzecheng/IRNet-1","repo_kind":"official","path":"sem2SQL.py","file_url":"https://github.com/zhanzecheng/IRNet-1/blob/HEAD/sem2SQL.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"beb755eade641481"}},{"code_sha256_prefix":"7e01be511a9ebcf6","entry":"table_dict_to_mask_tensor","repo":"zhanzecheng/IRNet-1","repo_kind":"official","path":"src/models/nn_utils.py","file_url":"https://github.com/zhanzecheng/IRNet-1/blob/HEAD/src/models/nn_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"7e01be511a9ebcf6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}