FINER-SQL: Boosting Small Language Models for Text-to-SQL

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Hoang, Thanh Dat, Huynh, Thanh Trung, Weidlich, Matthias, Nguyen, Thanh Tam, Chen, Tong, Yin, Hongzhi, Nguyen, Quoc Viet Hung
Format: Preprint
Publié: 2026
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866914528872103936
author Hoang, Thanh Dat
Huynh, Thanh Trung
Weidlich, Matthias
Nguyen, Thanh Tam
Chen, Tong
Yin, Hongzhi
Nguyen, Quoc Viet Hung
author_facet Hoang, Thanh Dat
Huynh, Thanh Trung
Weidlich, Matthias
Nguyen, Thanh Tam
Chen, Tong
Yin, Hongzhi
Nguyen, Quoc Viet Hung
contents Large language models have driven major advances in Text-to-SQL generation. However, they suffer from high computational cost, long latency, and data privacy concerns, which make them impractical for many real-world applications. A natural alternative is to use small language models (SLMs), which enable efficient and private on-premise deployment. Yet, SLMs often struggle with weak reasoning and poor instruction following. Conventional reinforcement learning methods based on sparse binary rewards (0/1) provide little learning signal when the generated SQLs are incorrect, leading to unstable or collapsed training. To overcome these issues, we propose FINER-SQL, a scalable and reusable reinforcement learning framework that enhances SLMs through fine-grained execution feedback. Built on group relative policy optimization, FINER-SQL replaces sparse supervision with dense and interpretable rewards that offer continuous feedback even for incorrect SQLs. It introduces two key reward functions: a memory reward, which aligns reasoning with verified traces for semantic stability, and an atomic reward, which measures operation-level overlap to grant partial credit for structurally correct but incomplete SQLs. This approach transforms discrete correctness into continuous learning, enabling stable, critic-free optimization. Experiments on the BIRD and Spider benchmarks show that FINER-SQL achieves up to 67.73\% and 85\% execution accuracy with a 3B model -- matching much larger LLMs while reducing inference latency to 5.57~s/sample. These results highlight a cost-efficient and privacy-preserving path toward high-performance Text-to-SQL generation. Our code is available at https://github.com/thanhdath/finer-sql.
format Preprint
id arxiv_https___arxiv_org_abs_2605_03465
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle FINER-SQL: Boosting Small Language Models for Text-to-SQL
Hoang, Thanh Dat
Huynh, Thanh Trung
Weidlich, Matthias
Nguyen, Thanh Tam
Chen, Tong
Yin, Hongzhi
Nguyen, Quoc Viet Hung
Databases
Artificial Intelligence
Computation and Language
Human-Computer Interaction
Multiagent Systems
Large language models have driven major advances in Text-to-SQL generation. However, they suffer from high computational cost, long latency, and data privacy concerns, which make them impractical for many real-world applications. A natural alternative is to use small language models (SLMs), which enable efficient and private on-premise deployment. Yet, SLMs often struggle with weak reasoning and poor instruction following. Conventional reinforcement learning methods based on sparse binary rewards (0/1) provide little learning signal when the generated SQLs are incorrect, leading to unstable or collapsed training. To overcome these issues, we propose FINER-SQL, a scalable and reusable reinforcement learning framework that enhances SLMs through fine-grained execution feedback. Built on group relative policy optimization, FINER-SQL replaces sparse supervision with dense and interpretable rewards that offer continuous feedback even for incorrect SQLs. It introduces two key reward functions: a memory reward, which aligns reasoning with verified traces for semantic stability, and an atomic reward, which measures operation-level overlap to grant partial credit for structurally correct but incomplete SQLs. This approach transforms discrete correctness into continuous learning, enabling stable, critic-free optimization. Experiments on the BIRD and Spider benchmarks show that FINER-SQL achieves up to 67.73\% and 85\% execution accuracy with a 3B model -- matching much larger LLMs while reducing inference latency to 5.57~s/sample. These results highlight a cost-efficient and privacy-preserving path toward high-performance Text-to-SQL generation. Our code is available at https://github.com/thanhdath/finer-sql.
title FINER-SQL: Boosting Small Language Models for Text-to-SQL
topic Databases
Artificial Intelligence
Computation and Language
Human-Computer Interaction
Multiagent Systems
url https://arxiv.org/abs/2605.03465