{"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/jolt-sql-joint-loss-tuning-of-text-to-sql","title":"JOLT-SQL: Joint Loss Tuning of Text-to-SQL with Confusion-aware Noisy Schema Sampling","arxiv_id":"2505.14305","date":"2025-05-20","proceeding":null,"authors":["Jinwang Song","Hongying Zan","Kunli Zhang","Lingling Mu","Yingjie Han","Haobo Hua","Min Peng"],"abstract":"Text-to-SQL, which maps natural language to SQL queries, has benefited greatly from recent advances in Large Language Models (LLMs). While LLMs offer various paradigms for this task, including prompting and supervised fine-tuning (SFT), SFT approaches still face challenges such as complex multi-stage pipelines and poor robustness to noisy schema information. To address these limitations, we present JOLT-SQL, a streamlined single-stage SFT framework that jointly optimizes schema linking and SQL generation via a unified loss. JOLT-SQL employs discriminative schema linking, enhanced by local bidirectional attention, alongside a confusion-aware noisy schema sampling strategy with selective attention to improve robustness under noisy schema conditions. Experiments on the Spider and BIRD benchmarks demonstrate that JOLT-SQL achieves state-of-the-art execution accuracy among comparable-size open-source models, while significantly improving both training and inference efficiency.","url_abs":"https://arxiv.org/abs/2505.14305v1","url_pdf":"https://arxiv.org/pdf/2505.14305v1.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":"jolt-sql-joint-loss-tuning-of-text-to-sql","repo_url":"https://github.com/songjw133/joint-loss-tuning-of-text-to-sql","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":null}],"tasks":[{"task_slug":"text-to-sql","task_name":"Text to SQL"},{"task_slug":"text-to-sql","task_name":"Text-To-SQL"}],"methods":[{"method_slug":"attention","method_name":"Attention"},{"method_slug":"sft","method_name":"SFT"},{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2505.14305","atlas_url":"https://app.syntology.ai/?focus=2505.14305","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2505.14305"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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":"deterministic:regex_extraction","url":"https://github.com/Songjw133/JOLT-SQL","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_fixture":1,"ran_violates":3,"ran":9,"ran_draft_wrong":3,"unverified":2},"by_repo_kind":{"found_in_text":{"samples":18,"ran":16,"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":"bd001f76894a9867","entry":"acc","repo":"Songjw133/JOLT-SQL","repo_kind":"found_in_text","path":"test_suite_sql_eval/evaluate_classical.py","file_url":"https://github.com/Songjw133/JOLT-SQL/blob/HEAD/test_suite_sql_eval/evaluate_classical.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bd001f76894a9867"}},{"code_sha256_prefix":"8231e3fdffa9c8ee","entry":"condition_has_like","repo":"Songjw133/JOLT-SQL","repo_kind":"found_in_text","path":"test_suite_sql_eval/evaluation.py","file_url":"https://github.com/Songjw133/JOLT-SQL/blob/HEAD/test_suite_sql_eval/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":"Songjw133/JOLT-SQL","repo_kind":"found_in_text","path":"test_suite_sql_eval/evaluation.py","file_url":"https://github.com/Songjw133/JOLT-SQL/blob/HEAD/test_suite_sql_eval/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":"Songjw133/JOLT-SQL","repo_kind":"found_in_text","path":"test_suite_sql_eval/evaluation.py","file_url":"https://github.com/Songjw133/JOLT-SQL/blob/HEAD/test_suite_sql_eval/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":"0e73074433136ad3","entry":"find_subsequence","repo":"Songjw133/JOLT-SQL","repo_kind":"found_in_text","path":"JOLT_spider_v1.py","file_url":"https://github.com/Songjw133/JOLT-SQL/blob/HEAD/JOLT_spider_v1.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":"0e73074433136ad3"}},{"code_sha256_prefix":"2f701949fb88a0d5","entry":"get_cursor_from_path","repo":"Songjw133/JOLT-SQL","repo_kind":"found_in_text","path":"test_suite_sql_eval/exec_subprocess.py","file_url":"https://github.com/Songjw133/JOLT-SQL/blob/HEAD/test_suite_sql_eval/exec_subprocess.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2f701949fb88a0d5"}},{"code_sha256_prefix":"0992d2a47ae733fa","entry":"get_schema","repo":"Songjw133/JOLT-SQL","repo_kind":"found_in_text","path":"test_suite_sql_eval/process_sql.py","file_url":"https://github.com/Songjw133/JOLT-SQL/blob/HEAD/test_suite_sql_eval/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":"Songjw133/JOLT-SQL","repo_kind":"found_in_text","path":"test_suite_sql_eval/process_sql.py","file_url":"https://github.com/Songjw133/JOLT-SQL/blob/HEAD/test_suite_sql_eval/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":"2178b95c919ae420","entry":"join_tokens","repo":"Songjw133/JOLT-SQL","repo_kind":"found_in_text","path":"test_suite_sql_eval/parse.py","file_url":"https://github.com/Songjw133/JOLT-SQL/blob/HEAD/test_suite_sql_eval/parse.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":"2178b95c919ae420"}},{"code_sha256_prefix":"c64a2627f38e10a8","entry":"load_predictions","repo":"Songjw133/JOLT-SQL","repo_kind":"found_in_text","path":"test_suite_sql_eval/evaluate_classical.py","file_url":"https://github.com/Songjw133/JOLT-SQL/blob/HEAD/test_suite_sql_eval/evaluate_classical.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c64a2627f38e10a8"}},{"code_sha256_prefix":"f23d6ff3772963bc","entry":"permute_tuple","repo":"Songjw133/JOLT-SQL","repo_kind":"found_in_text","path":"test_suite_sql_eval/exec_eval.py","file_url":"https://github.com/Songjw133/JOLT-SQL/blob/HEAD/test_suite_sql_eval/exec_eval.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":"f23d6ff3772963bc"}},{"code_sha256_prefix":"58e472cff9780d63","entry":"postprocess","repo":"Songjw133/JOLT-SQL","repo_kind":"found_in_text","path":"test_suite_sql_eval/parse.py","file_url":"https://github.com/Songjw133/JOLT-SQL/blob/HEAD/test_suite_sql_eval/parse.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":"58e472cff9780d63"}},{"code_sha256_prefix":"a40510ba6a37f798","entry":"quick_rej","repo":"Songjw133/JOLT-SQL","repo_kind":"found_in_text","path":"test_suite_sql_eval/exec_eval.py","file_url":"https://github.com/Songjw133/JOLT-SQL/blob/HEAD/test_suite_sql_eval/exec_eval.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":"a40510ba6a37f798"}},{"code_sha256_prefix":"d7bcb03a0faa63ed","entry":"replace_cur_year","repo":"Songjw133/JOLT-SQL","repo_kind":"found_in_text","path":"test_suite_sql_eval/exec_subprocess.py","file_url":"https://github.com/Songjw133/JOLT-SQL/blob/HEAD/test_suite_sql_eval/exec_subprocess.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d7bcb03a0faa63ed"}},{"code_sha256_prefix":"a79a9b45387beff9","entry":"save_pristine_base_model_state","repo":"Songjw133/JOLT-SQL","repo_kind":"found_in_text","path":"utils.py","file_url":"https://github.com/Songjw133/JOLT-SQL/blob/HEAD/utils.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":"a79a9b45387beff9"}},{"code_sha256_prefix":"afc8ef89576ef2aa","entry":"unorder_row","repo":"Songjw133/JOLT-SQL","repo_kind":"found_in_text","path":"test_suite_sql_eval/exec_eval.py","file_url":"https://github.com/Songjw133/JOLT-SQL/blob/HEAD/test_suite_sql_eval/exec_eval.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":"afc8ef89576ef2aa"}},{"code_sha256_prefix":"3426fdab59498b56","entry":"getDataLoader","repo":"Songjw133/JOLT-SQL","repo_kind":"found_in_text","path":"JOLT_spider_v1.py","file_url":"https://github.com/Songjw133/JOLT-SQL/blob/HEAD/JOLT_spider_v1.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":"3426fdab59498b56"}},{"code_sha256_prefix":"a906f5de1f5971b0","entry":"tokenize","repo":"Songjw133/JOLT-SQL","repo_kind":"found_in_text","path":"test_suite_sql_eval/process_sql.py","file_url":"https://github.com/Songjw133/JOLT-SQL/blob/HEAD/test_suite_sql_eval/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}