{"id":127583,"topic":"ai","source":"arxiv","title":"SQLoom: Set-Contrastive Learning of Syntactic, Semantic, and Logical Dependencies for Text-to-SQL","url":"https://arxiv.org/abs/2611.03298","url_hash":"1246915b592e3be0014a678192876e3f0910cf2e","author":"Hao Fu, Degang Sun, Wan Wei, Jinxia Wei, Chun Long, Peng Gao","summary":"Text-to-SQL translates natural language questions into SQL queries, enabling database access without writing SQL. Fine-tuning open-weight large language models (LLMs) is cost-effective, but existing methods treat SQL as ordinary text and optimize token-level likelihood without explicitly modeling its syntactic, semantic, and logical requirements. Thus, a single incorrect alias or comparison operator can invalidate a query while contributing little to training loss. We propose SQLoom, a constraint-aware fine-tuning framework with supervision at three levels: syntactic validity under SQL grammar and database schema, semantic alignment between query decisions and the question, and logical consistency across dependent clause decisions. SQLoom extends supervised fine-tuning with a unified set-contrastive objective favoring sets of correct outputs over minimally different incorrect ones at each level. LLM agents propose this supervision, which a SQL parser and execution on counterexample databases verify. We also release Spider-Refined, a training dataset correcting 378 flawed Spider annotations and enriching database schemas. Experiments on Spider, BIRD, and three perturbed Spider variants show that SQLoom improves execution accuracy for Qwen3-1.7B from 62.9% zero-shot to 88.7% on Spider development, reaching 89.2% on Spider test and 73.4% on BIRD development. It outperforms fine-tuning, reinforcement learning, and agent-based baselines with up to 70 billion parameters. On question perturbations, SQLoom loses at most 0.6 accuracy points versus up to 12.1 for agent-based methods. It generates SQL in a single pass at 0.42s per query, 23$\\times$ faster than a GPT-4-based agent method. These results demonstrate the effectiveness of set-contrastive supervision over token-level training.","content":null,"image_url":null,"lang":"","published_at":"2026-11-02T15:33:40+00:00","fetched_at":"2026-11-03T09:57:36+00:00","status":"read","starred":0,"extract_state":"ok","summary_auto":null,"cluster_id":null,"extract_retries":0,"extract_error":null,"item_type":"paper","ref_id":"10.48550/arxiv.2611.03298","refs_json":"{\"authors\": [\"Hao Fu\", \"Degang Sun\", \"Wan Wei\", \"Jinxia Wei\", \"Chun Long\", \"Peng Gao\"]}","doi":"10.48550/arxiv.2611.03298","arxiv_id":"2611.03298","paper_version":"v1","sources_json":"[{\"name\": \"arxiv\"}]","relevance_score":0.4,"relevance_method":"keyword","cited_by":null,"contract_version":"news_item.v1","format_contract_version":"news_item_formats.v1","dedup_url":"https://arxiv.org/abs/2611.03298","quality_profile":{"profile_version":"extraction_quality.v2","bucket":"medium","confidence":0.5,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"Medium confidence: summary fallback used without full text.","operator_guidance":{"severity":"warning","recommended_action":"use_summary_with_caveat","next_step":"Use the available summary only with a visible quality caveat.","operator_label":"Use summary with caveat","can_retry":false,"can_use_summary":true,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"summary_only","label":"Summary only","has_full_text":false,"has_summary":true,"content_length":0,"summary_length":1807,"usable_text_length":1807,"source_field":"summary"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":0,"summary_length":1807}},"news_item":{"id":127583,"canonical_url":"https://arxiv.org/abs/2611.03298","source_url":"https://arxiv.org/abs/2611.03298","title":"SQLoom: Set-Contrastive Learning of Syntactic, Semantic, and Logical Dependencies for Text-to-SQL","source_name":"arxiv","author":"Hao Fu, Degang Sun, Wan Wei, Jinxia Wei, Chun Long, Peng Gao","published_at":"2026-11-02T15:33:40+00:00","locale":null,"topic":"ai","tags":[],"rss_summary":"Text-to-SQL translates natural language questions into SQL queries, enabling database access without writing SQL. Fine-tuning open-weight large language models (LLMs) is cost-effective, but existing methods treat SQL as ordinary text and optimize token-level likelihood without explicitly modeling its syntactic, semantic, and logical requirements. Thus, a single incorrect alias or comparison operator can invalidate a query while contributing little to training loss. We propose SQLoom, a constraint-aware fine-tuning framework with supervision at three levels: syntactic validity under SQL grammar and database schema, semantic alignment between query decisions and the question, and logical consistency across dependent clause decisions. SQLoom extends supervised fine-tuning with a unified set-contrastive objective favoring sets of correct outputs over minimally different incorrect ones at each level. LLM agents propose this supervision, which a SQL parser and execution on counterexample databases verify. We also release Spider-Refined, a training dataset correcting 378 flawed Spider annotations and enriching database schemas. Experiments on Spider, BIRD, and three perturbed Spider variants show that SQLoom improves execution accuracy for Qwen3-1.7B from 62.9% zero-shot to 88.7% on Spider development, reaching 89.2% on Spider test and 73.4% on BIRD development. It outperforms fine-tuning, reinforcement learning, and agent-based baselines with up to 70 billion parameters. On question perturbations, SQLoom loses at most 0.6 accuracy points versus up to 12.1 for agent-based methods. It generates SQL in a single pass at 0.42s per query, 23$\\times$ faster than a GPT-4-based agent method. These results demonstrate the effectiveness of set-contrastive supervision over token-level training.","full_text":null,"excerpt":"Text-to-SQL translates natural language questions into SQL queries, enabling database access without writing SQL. Fine-tuning open-weight large language models (LLMs) is cost-effective, but existing methods treat SQL as ordinary text and optimize token-level likelihood without explicitly modeling its syntactic, semantic, and logical requirements. Thus, a single incorrect alias or comparison operator can invalidate a query while contributing little to training loss. We propose SQLoom, a constraint-aware fine-tuning framework with supervision at three levels: syntactic validity under SQL grammar and database schema, semantic alignment between query decisions and the question, and logical consistency across dependent clause decisions. SQLoom extends supervised fine-tuning with a unified set-contrastive objective favoring sets of correct outputs over minimally different incorrect ones at each level. LLM agents propose this supervision, which a SQL parser and execution on counterexample databases verify. We also release Spider-Refined, a training dataset correcting 378 flawed Spider annotations and enriching database schemas. Experiments on Spider, BIRD, and three perturbed Spider variants show that SQLoom improves execution accuracy for Qwen3-1.7B from 62.9% zero-shot to 88.7% on Spider development, reaching 89.2% on Spider test and 73.4% on BIRD development. It outperforms fine-tuning, reinforcement learning, and agent-based baselines with up to 70 billion parameters. On question perturbations, SQLoom loses at most 0.6 accuracy points versus up to 12.1 for agent-based methods. It generates SQL in a single pass at 0.42s per query, 23$\\times$ faster than a GPT-4-based agent method. These results demonstrate the effectiveness of set-contrastive supervision over token-level training.","extraction":{"state":"ok","confidence":0.5,"error":null,"explanation":"Medium confidence: summary fallback used without full text.","diagnostics_url":"/api/diagnose?url=https%3A//arxiv.org/abs/2611.03298","quality_profile":{"profile_version":"extraction_quality.v2","bucket":"medium","confidence":0.5,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"Medium confidence: summary fallback used without full text.","operator_guidance":{"severity":"warning","recommended_action":"use_summary_with_caveat","next_step":"Use the available summary only with a visible quality caveat.","operator_label":"Use summary with caveat","can_retry":false,"can_use_summary":true,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"summary_only","label":"Summary only","has_full_text":false,"has_summary":true,"content_length":0,"summary_length":1807,"usable_text_length":1807,"source_field":"summary"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":0,"summary_length":1807}}},"display_formats":["compact","card","full","digest_section","json"]},"daily_stack_record":{"title":"SQLoom: Set-Contrastive Learning of Syntactic, Semantic, and Logical Dependencies for Text-to-SQL","url":"https://arxiv.org/abs/2611.03298","summary":"Text-to-SQL translates natural language questions into SQL queries, enabling database access without writing SQL. Fine-tuning open-weight large language models (LLMs) is cost-effective, but existing methods treat SQL as ordinary text and optimize token-level likelihood without explicitly modeling its syntactic, semantic, and logical requirements. Thus, a single incorrect alias or comparison operator can invalidate a query while contributing little to training loss. We propose SQLoom, a constraint-aware fine-tuning framework with supervision at three levels: syntactic validity under SQL grammar and database schema, semantic alignment between query decisions and the question, and logical consistency across dependent clause decisions. SQLoom extends supervised fine-tuning with a unified set-contrastive objective favoring sets of correct outputs over minimally different incorrect ones at each level. LLM agents propose this supervision, which a SQL parser and execution on counterexample databases verify. We also release Spider-Refined, a training dataset correcting 378 flawed Spider annotations and enriching database schemas. Experiments on Spider, BIRD, and three perturbed Spider variants show that SQLoom improves execution accuracy for Qwen3-1.7B from 62.9% zero-shot to 88.7% on Spider development, reaching 89.2% on Spider test and 73.4% on BIRD development. It outperforms fine-tuning, reinforcement learning, and agent-based baselines with up to 70 billion parameters. On question perturbations, SQLoom loses at most 0.6 accuracy points versus up to 12.1 for agent-based methods. It generates SQL in a single pass at 0.42s per query, 23$\\times$ faster than a GPT-4-based agent method. These results demonstrate the effectiveness of set-contrastive supervision over token-level training.","source":"arxiv","date":"2026-11-02T15:33:40+00:00","content":"","confidence":0.5,"diagnostics_url":"/api/diagnose?url=https%3A//arxiv.org/abs/2611.03298","quality_bucket":"medium","failure_kind":"none","retryable":false,"quality_reason":"Medium confidence: summary fallback used without full text.","quality_profile":{"profile_version":"extraction_quality.v2","bucket":"medium","confidence":0.5,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"Medium confidence: summary fallback used without full text.","operator_guidance":{"severity":"warning","recommended_action":"use_summary_with_caveat","next_step":"Use the available summary only with a visible quality caveat.","operator_label":"Use summary with caveat","can_retry":false,"can_use_summary":true,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"summary_only","label":"Summary only","has_full_text":false,"has_summary":true,"content_length":0,"summary_length":1807,"usable_text_length":1807,"source_field":"summary"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":0,"summary_length":1807}},"tags":[]},"fallback_formats":["markdown","json","html"],"actions":{"read":"/item/127583","export_markdown":"/api/items/127583/export?format=markdown","export_json":"/api/items/127583/export?format=json","diagnose":"/api/diagnose?url=https%3A//arxiv.org/abs/2611.03298"},"formats":{"full":{"id":127583,"title":"SQLoom: Set-Contrastive Learning of Syntactic, Semantic, and Logical Dependencies for Text-to-SQL","url":"https://arxiv.org/abs/2611.03298","source":"arxiv","author":"Hao Fu, Degang Sun, Wan Wei, Jinxia Wei, Chun Long, Peng Gao","published_at":"2026-11-02T15:33:40+00:00","locale":null,"topic":"ai","tags":[],"excerpt":"Text-to-SQL translates natural language questions into SQL queries, enabling database access without writing SQL. Fine-tuning open-weight large language models (LLMs) is cost-effective, but existing methods treat SQL as ordinary text and optimize token-level likelihood without explicitly modeling its syntactic, semantic, and logical requirements. Thus, a single incorrect alias or comparison operator can invalidate a query while contributing little to training loss. We propose SQLoom, a constraint-aware fine-tuning framework with supervision at three levels: syntactic validity under SQL grammar and database schema, semantic alignment between query decisions and the question, and logical consistency across dependent clause decisions. SQLoom extends supervised fine-tuning with a unified set-contrastive objective favoring sets of correct outputs over minimally different incorrect ones at each level. LLM agents propose this supervision, which a SQL parser and execution on counterexample databases verify. We also release Spider-Refined, a training dataset correcting 378 flawed Spider annotations and enriching database schemas. Experiments on Spider, BIRD, and three perturbed Spider variants show that SQLoom improves execution accuracy for Qwen3-1.7B from 62.9% zero-shot to 88.7% on Spider development, reaching 89.2% on Spider test and 73.4% on BIRD development. It outperforms fine-tuning, reinforcement learning, and agent-based baselines with up to 70 billion parameters. On question perturbations, SQLoom loses at most 0.6 accuracy points versus up to 12.1 for agent-based methods. It generates SQL in a single pass at 0.42s per query, 23$\\times$ faster than a GPT-4-based agent method. These results demonstrate the effectiveness of set-contrastive supervision over token-level training.","full_text":null,"reading_time_min":1,"extraction":{"state":"ok","confidence":0.5,"error":null,"explanation":"Medium confidence: summary fallback used without full text.","diagnostics_url":"/api/diagnose?url=https%3A//arxiv.org/abs/2611.03298","quality_profile":{"profile_version":"extraction_quality.v2","bucket":"medium","confidence":0.5,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"Medium confidence: summary fallback used without full text.","operator_guidance":{"severity":"warning","recommended_action":"use_summary_with_caveat","next_step":"Use the available summary only with a visible quality caveat.","operator_label":"Use summary with caveat","can_retry":false,"can_use_summary":true,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"summary_only","label":"Summary only","has_full_text":false,"has_summary":true,"content_length":0,"summary_length":1807,"usable_text_length":1807,"source_field":"summary"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":0,"summary_length":1807}}},"quality_profile":{"profile_version":"extraction_quality.v2","bucket":"medium","confidence":0.5,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"Medium confidence: summary fallback used without full text.","operator_guidance":{"severity":"warning","recommended_action":"use_summary_with_caveat","next_step":"Use the available summary only with a visible quality caveat.","operator_label":"Use summary with caveat","can_retry":false,"can_use_summary":true,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"summary_only","label":"Summary only","has_full_text":false,"has_summary":true,"content_length":0,"summary_length":1807,"usable_text_length":1807,"source_field":"summary"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":0,"summary_length":1807}},"actions":{"read":"/item/127583","export_markdown":"/api/items/127583/export?format=markdown","export_json":"/api/items/127583/export?format=json","diagnose":"/api/diagnose?url=https%3A//arxiv.org/abs/2611.03298"}},"digest":{"id":127583,"title":"SQLoom: Set-Contrastive Learning of Syntactic, Semantic, and Logical Dependencies for Text-to-SQL","url":"https://arxiv.org/abs/2611.03298","source":"arxiv","topic":"ai","published_at":"2026-11-02T15:33:40+00:00","excerpt":"Text-to-SQL translates natural language questions into SQL queries, enabling database access without writing SQL. Fine-tuning open-weight large language models (LLMs) is cost-effective, but existing methods treat SQL as ordinary text and optimize token-level likelihood without…","quality_bucket":"medium","quality_reason":"Medium confidence: summary fallback used without full text.","reading_time_min":1,"cluster_id":null},"card":{"display_title":"SQLoom: Set-Contrastive Learning of Syntactic, Semantic, and Logical Dependencies for Text-to-SQL","subtitle":"arxiv · 2026-11-02","summary":"Text-to-SQL translates natural language questions into SQL queries, enabling database access without writing SQL. Fine-tuning open-weight large language models (LLMs) is cost-effective, but existing methods treat SQL as…","badges":["quality:medium"],"links":{"read":"/item/127583","original":"https://arxiv.org/abs/2611.03298","diagnose":"/api/diagnose?url=https%3A//arxiv.org/abs/2611.03298"},"quality_warning":null},"export":{"title":"SQLoom: Set-Contrastive Learning of Syntactic, Semantic, and Logical Dependencies for Text-to-SQL","url":"https://arxiv.org/abs/2611.03298","summary":"Text-to-SQL translates natural language questions into SQL queries, enabling database access without writing SQL. Fine-tuning open-weight large language models (LLMs) is cost-effective, but existing methods treat SQL as ordinary text and optimize token-level likelihood without explicitly modeling its syntactic, semantic, and logical requirements. Thus, a single incorrect alias or comparison operator can invalidate a query while contributing little to training loss. We propose SQLoom, a constraint-aware fine-tuning framework with supervision at three levels: syntactic validity under SQL grammar and database schema, semantic alignment between query decisions and the question, and logical consistency across dependent clause decisions. SQLoom extends supervised fine-tuning with a unified set-contrastive objective favoring sets of correct outputs over minimally different incorrect ones at each level. LLM agents propose this supervision, which a SQL parser and execution on counterexample databases verify. We also release Spider-Refined, a training dataset correcting 378 flawed Spider annotations and enriching database schemas. Experiments on Spider, BIRD, and three perturbed Spider variants show that SQLoom improves execution accuracy for Qwen3-1.7B from 62.9% zero-shot to 88.7% on Spider development, reaching 89.2% on Spider test and 73.4% on BIRD development. It outperforms fine-tuning, reinforcement learning, and agent-based baselines with up to 70 billion parameters. On question perturbations, SQLoom loses at most 0.6 accuracy points versus up to 12.1 for agent-based methods. It generates SQL in a single pass at 0.42s per query, 23$\\times$ faster than a GPT-4-based agent method. These results demonstrate the effectiveness of set-contrastive supervision over token-level training.","source":"arxiv","date":"2026-11-02T15:33:40+00:00","content":"","confidence":0.5,"diagnostics_url":"/api/diagnose?url=https%3A//arxiv.org/abs/2611.03298","quality_bucket":"medium","failure_kind":"none","retryable":false,"quality_reason":"Medium confidence: summary fallback used without full text.","quality_profile":{"profile_version":"extraction_quality.v2","bucket":"medium","confidence":0.5,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"Medium confidence: summary fallback used without full text.","operator_guidance":{"severity":"warning","recommended_action":"use_summary_with_caveat","next_step":"Use the available summary only with a visible quality caveat.","operator_label":"Use summary with caveat","can_retry":false,"can_use_summary":true,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"summary_only","label":"Summary only","has_full_text":false,"has_summary":true,"content_length":0,"summary_length":1807,"usable_text_length":1807,"source_field":"summary"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":0,"summary_length":1807}},"tags":[],"format_contract_version":"news_item_formats.v1"}}}