{"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/msc-sql-multi-sample-critiquing-small","title":"MSc-SQL: Multi-Sample Critiquing Small Language Models For Text-To-SQL Translation","arxiv_id":"2410.12916","date":"2024-10-16","proceeding":null,"authors":["Satya Krishna Gorti","Ilan Gofman","Zhaoyan Liu","Jiapeng Wu","Noël Vouitsis","Guangwei Yu","Jesse C. Cresswell","Rasa Hosseinzadeh"],"abstract":"Text-to-SQL generation enables non-experts to interact with databases via natural language. Recent advances rely on large closed-source models like GPT-4 that present challenges in accessibility, privacy, and latency. To address these issues, we focus on developing small, efficient, and open-source text-to-SQL models. We demonstrate the benefits of sampling multiple candidate SQL generations and propose our method, MSc-SQL, to critique them using associated metadata. Our sample critiquing model evaluates multiple outputs simultaneously, achieving state-of-the-art performance compared to other open-source models while remaining competitive with larger models at a much lower cost. Full code can be found at github.com/layer6ai-labs/msc-sql.","url_abs":"https://arxiv.org/abs/2410.12916v1","url_pdf":"https://arxiv.org/pdf/2410.12916v1.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":"msc-sql-multi-sample-critiquing-small","repo_url":"https://github.com/layer6ai-labs/msc-sql","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"text-to-sql","task_name":"Text to SQL"},{"task_slug":"text-to-sql","task_name":"Text-To-SQL"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"focus","method_name":"Focus"},{"method_slug":"gpt-4","method_name":"GPT-4"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/text-to-sql-on-bird-big-bench-for-large-scale","task":"Text-To-SQL","dataset":"BIRD (BIg Bench for LaRge-scale Database Grounded Text-to-SQL Evaluation)","model":"MSc-SQL","rank_in_archive_order":38,"of":41,"metrics":{"Execution Accuracy % (Dev)":"65.6"},"uses_additional_data":false},{"leaderboard":"/sota/text-to-sql-on-spider","task":"Text-To-SQL","dataset":"spider","model":"MSc-SQL","rank_in_archive_order":5,"of":20,"metrics":{"Execution Accuracy (Test)":"84.7"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2410.12916","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.12916"}},"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/layer6ai-labs/msc-sql","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":9},"by_repo_kind":{"official":{"samples":9,"ran":9,"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":"4d77bf10ae07767a","entry":"construct_db_table_names_dict","repo":"layer6ai-labs/msc-sql","repo_kind":"official","path":"dataset_preprocess.py","file_url":"https://github.com/layer6ai-labs/msc-sql/blob/HEAD/dataset_preprocess.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4d77bf10ae07767a"}},{"code_sha256_prefix":"d519fc62c6ec4345","entry":"construct_foreign_keys_from_metadata","repo":"layer6ai-labs/msc-sql","repo_kind":"official","path":"dataset_preprocess.py","file_url":"https://github.com/layer6ai-labs/msc-sql/blob/HEAD/dataset_preprocess.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d519fc62c6ec4345"}},{"code_sha256_prefix":"723ec472cbc778d8","entry":"conversations_formatting_function","repo":"layer6ai-labs/msc-sql","repo_kind":"official","path":"models/model_base.py","file_url":"https://github.com/layer6ai-labs/msc-sql/blob/HEAD/models/model_base.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"723ec472cbc778d8"}},{"code_sha256_prefix":"b98c2d1d6cd9e90c","entry":"format_results_html","repo":"layer6ai-labs/msc-sql","repo_kind":"official","path":"datautils/sql_results.py","file_url":"https://github.com/layer6ai-labs/msc-sql/blob/HEAD/datautils/sql_results.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b98c2d1d6cd9e90c"}},{"code_sha256_prefix":"ed58f6158c045eda","entry":"format_results_markdown","repo":"layer6ai-labs/msc-sql","repo_kind":"official","path":"datautils/sql_results.py","file_url":"https://github.com/layer6ai-labs/msc-sql/blob/HEAD/datautils/sql_results.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ed58f6158c045eda"}},{"code_sha256_prefix":"7739a5427ea96e9d","entry":"get_col_description","repo":"layer6ai-labs/msc-sql","repo_kind":"official","path":"dataset_preprocess.py","file_url":"https://github.com/layer6ai-labs/msc-sql/blob/HEAD/dataset_preprocess.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7739a5427ea96e9d"}},{"code_sha256_prefix":"39d1b7e2bc57a6fa","entry":"init_bird_message","repo":"layer6ai-labs/msc-sql","repo_kind":"official","path":"dataset_gen.py","file_url":"https://github.com/layer6ai-labs/msc-sql/blob/HEAD/dataset_gen.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"39d1b7e2bc57a6fa"}},{"code_sha256_prefix":"af91033b3006347a","entry":"init_spider_message","repo":"layer6ai-labs/msc-sql","repo_kind":"official","path":"dataset_gen.py","file_url":"https://github.com/layer6ai-labs/msc-sql/blob/HEAD/dataset_gen.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"af91033b3006347a"}},{"code_sha256_prefix":"64b000099b946d2c","entry":"str2bool","repo":"layer6ai-labs/msc-sql","repo_kind":"official","path":"inference.py","file_url":"https://github.com/layer6ai-labs/msc-sql/blob/HEAD/inference.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"64b000099b946d2c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}