FINER-SQL: 텍스트-SQL 생성을 위한 소규모 언어 모델 성능 향상
FINER-SQL: Boosting Small Language Models for Text-to-SQL
대규모 언어 모델은 텍스트-SQL 생성 분야에서 괄목할 만한 발전을 이루었지만, 높은 계산 비용, 긴 지연 시간, 그리고 데이터 개인 정보 보호 문제로 인해 많은 실제 응용 분야에서 활용하기 어렵습니다. 자연스러운 대안은 효율적이고 안전한 온프레미스 배포를 가능하게 하는 소규모 언어 모델(SLM)을 사용하는 것입니다. 그러나 SLM은 종종 추론 능력 부족과 지시사항 준수 능력 부족으로 어려움을 겪습니다. 기존의 희소 이진 보상(0/1) 기반 강화 학습 방법은 생성된 SQL이 부정확할 때 학습 신호를 거의 제공하지 않아 불안정하거나 훈련이 제대로 이루어지지 않는 문제를 야기합니다. 이러한 문제를 해결하기 위해, 우리는 세분화된 실행 피드백을 통해 SLM을 향상시키는 확장 가능하고 재사용 가능한 강화 학습 프레임워크인 FINER-SQL을 제안합니다. 그룹 상대 정책 최적화 기반으로 구축된 FINER-SQL은 희소한 감독 방식을 밀집되고 해석 가능한 보상으로 대체하여, 부정확한 SQL에 대해서도 지속적인 피드백을 제공합니다. 이 방법은 두 가지 핵심 보상 함수를 도입합니다. 첫째, 의미적 안정성을 위한 검증된 추적과 추론을 연계하는 메모리 보상 함수입니다. 둘째, 구조적으로 올바르지만 불완전한 SQL에 대해 부분 점수를 부여하기 위해 연산 수준의 중복을 측정하는 원자 보상 함수입니다. 이러한 접근 방식은 이산적인 정확성을 연속적인 학습으로 변환하여 안정적인 비판-없는 최적화를 가능하게 합니다. BIRD 및 Spider 벤치마크에서의 실험 결과, FINER-SQL은 3B 모델을 사용하여 최대 67.73% 및 85%의 실행 정확도를 달성했으며, 이는 훨씬 더 큰 LLM과 유사한 성능을 보이면서 추론 지연 시간을 5.57초/샘플로 줄였습니다. 이러한 결과는 고성능 텍스트-SQL 생성을 위한 비용 효율적이고 개인 정보 보호 기능을 갖춘 경로를 제시합니다. 저희의 코드는 https://github.com/thanhdath/finer-sql 에서 확인할 수 있습니다.
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.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.