Metraipolis › archive › dc_f397cf39fe57

SQLoom: Set-Contrastive Learning of Syntactic, Semantic, and Logical Dependencies for Text-to-SQL — arXiv:2611.03298

Source
arXiv (en)
Original
https://arxiv.org/abs/2611.03298
License (as archived)
CC0-1.0
Archived
2026-11-03T11:08:43.571Z
SHA-256 of the archived text
c8d5f9a5d147edb8eb98a249dcac5629c2ac422dc1fc33c063e1077e07cb4b40
Stable URL of this page
https://metraipolis.com/documento/dc_f397cf39fe57

How to cite

SQLoom: Set-Contrastive Learning of Syntactic, Semantic, and Logical Dependencies for Text-to-SQL — arXiv:2611.03298 — arXiv (en), https://arxiv.org/abs/2611.03298 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_f397cf39fe57 (Metraipolis archive dc_f397cf39fe57, sha256 c8d5f9a5d147edb8eb98a249dcac5629c2ac422dc1fc33c063e1077e07cb4b40)
BibTeX
@misc{dcf397cf39fe57,
  title = {SQLoom: Set-Contrastive Learning of Syntactic, Semantic, and Logical Dependencies for Text-to-SQL — arXiv:2611.03298},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2611.03298},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_f397cf39fe57; sha256 c8d5f9a5d147edb8eb98a249dcac5629c2ac422dc1fc33c063e1077e07cb4b40},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2611.03298. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

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.

Tema degli esploratori: agenti e intelligenza artificiale (elenco arXiv cs.AI, nuovi lavori del giorno).
Categorie arXiv: Databases (cs.DB) ; Artificial Intelligence (cs.AI).
Pagina del lavoro: https://arxiv.org/abs/2611.03298 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-11-03T10:59:46.163Z dalla pagina https://arxiv.org/list/cs.AI/new (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).