{"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/lgesql-line-graph-enhanced-text-to-sql-model","title":"LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relations","arxiv_id":"2106.01093","date":"2021-06-02","proceeding":"ACL 2021 5","authors":["Ruisheng Cao","Lu Chen","Zhi Chen","Yanbin Zhao","Su Zhu","Kai Yu"],"abstract":"This work aims to tackle the challenging heterogeneous graph encoding problem in the text-to-SQL task. Previous methods are typically node-centric and merely utilize different weight matrices to parameterize edge types, which 1) ignore the rich semantics embedded in the topological structure of edges, and 2) fail to distinguish local and non-local relations for each node. To this end, we propose a Line Graph Enhanced Text-to-SQL (LGESQL) model to mine the underlying relational features without constructing meta-paths. By virtue of the line graph, messages propagate more efficiently through not only connections between nodes, but also the topology of directed edges. Furthermore, both local and non-local relations are integrated distinctively during the graph iteration. We also design an auxiliary task called graph pruning to improve the discriminative capability of the encoder. Our framework achieves state-of-the-art results (62.8% with Glove, 72.0% with Electra) on the cross-domain text-to-SQL benchmark Spider at the time of writing.","url_abs":"https://arxiv.org/abs/2106.01093v3","url_pdf":"https://arxiv.org/pdf/2106.01093v3.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":"lgesql-line-graph-enhanced-text-to-sql-model","repo_url":"https://github.com/rhythmcao/text2sql-lgesql","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"text-to-sql","task_name":"Text to SQL"},{"task_slug":"text-to-sql","task_name":"Text-To-SQL"}],"methods":[{"method_slug":"pruning","method_name":"Pruning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2106.01093","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2106.01093"}},"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/rhythmcao/text2sql-lgesql","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_violates":3,"ran":2,"unverified":6},"by_repo_kind":{"official":{"samples":11,"ran":5,"repositories":1}},"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":"8231e3fdffa9c8ee","entry":"condition_has_like","repo":"rhythmcao/text2sql-lgesql","repo_kind":"official","path":"evaluation.py","file_url":"https://github.com/rhythmcao/text2sql-lgesql/blob/HEAD/evaluation.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8231e3fdffa9c8ee"}},{"code_sha256_prefix":"f2d76234528d3b57","entry":"condition_has_or","repo":"rhythmcao/text2sql-lgesql","repo_kind":"official","path":"evaluation.py","file_url":"https://github.com/rhythmcao/text2sql-lgesql/blob/HEAD/evaluation.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f2d76234528d3b57"}},{"code_sha256_prefix":"954c76e256cc7220","entry":"condition_has_sql","repo":"rhythmcao/text2sql-lgesql","repo_kind":"official","path":"evaluation.py","file_url":"https://github.com/rhythmcao/text2sql-lgesql/blob/HEAD/evaluation.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"954c76e256cc7220"}},{"code_sha256_prefix":"0992d2a47ae733fa","entry":"get_schema","repo":"rhythmcao/text2sql-lgesql","repo_kind":"official","path":"process_sql.py","file_url":"https://github.com/rhythmcao/text2sql-lgesql/blob/HEAD/process_sql.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0992d2a47ae733fa"}},{"code_sha256_prefix":"c4dcaf29b663a364","entry":"get_schema_from_json","repo":"rhythmcao/text2sql-lgesql","repo_kind":"official","path":"process_sql.py","file_url":"https://github.com/rhythmcao/text2sql-lgesql/blob/HEAD/process_sql.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c4dcaf29b663a364"}},{"code_sha256_prefix":"25c42ad079e7167e","entry":"clones","repo":"rhythmcao/text2sql-lgesql","repo_kind":"official","path":"model/model_utils.py","file_url":"https://github.com/rhythmcao/text2sql-lgesql/blob/HEAD/model/model_utils.py","link_basis":"first_harvest_node","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":"25c42ad079e7167e"}},{"code_sha256_prefix":"b54d0a53e495106f","entry":"cumsoftmax","repo":"rhythmcao/text2sql-lgesql","repo_kind":"official","path":"model/decoder/onlstm.py","file_url":"https://github.com/rhythmcao/text2sql-lgesql/blob/HEAD/model/decoder/onlstm.py","link_basis":"first_harvest_node","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":"b54d0a53e495106f"}},{"code_sha256_prefix":"dfc4442988bf7e23","entry":"lens2mask","repo":"rhythmcao/text2sql-lgesql","repo_kind":"official","path":"model/model_utils.py","file_url":"https://github.com/rhythmcao/text2sql-lgesql/blob/HEAD/model/model_utils.py","link_basis":"first_harvest_node","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":"dfc4442988bf7e23"}},{"code_sha256_prefix":"9bbd7187f61c565a","entry":"mask2matrix","repo":"rhythmcao/text2sql-lgesql","repo_kind":"official","path":"model/model_utils.py","file_url":"https://github.com/rhythmcao/text2sql-lgesql/blob/HEAD/model/model_utils.py","link_basis":"first_harvest_node","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":"9bbd7187f61c565a"}},{"code_sha256_prefix":"212773f9c186f66c","entry":"remove_comment","repo":"rhythmcao/text2sql-lgesql","repo_kind":"official","path":"asdl/asdl.py","file_url":"https://github.com/rhythmcao/text2sql-lgesql/blob/HEAD/asdl/asdl.py","link_basis":"first_harvest_node","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":"212773f9c186f66c"}},{"code_sha256_prefix":"a906f5de1f5971b0","entry":"tokenize","repo":"rhythmcao/text2sql-lgesql","repo_kind":"official","path":"process_sql.py","file_url":"https://github.com/rhythmcao/text2sql-lgesql/blob/HEAD/process_sql.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":"a906f5de1f5971b0"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}