LitE-SQL: A Lightweight and Efficient Text-to-SQL Framework with Vector-based Schema Linking and Execution-Guided Self-Correction
Piao, Lee, Park
The Text-to-SQL task translates natural language questions into SQL queries, enabling intuitive database interaction for non-experts. While recent methods leveraging Large Language Models (LLMs) achieve strong performance, their reliance on proprietary models raise concerns about deployment feasibility and data privacy. In this work, we introduce LitE-SQL, a Lightweight and Efficient framework with two components: (i) a Schema Retriever that performs efficient schema linking using a vector database of pre-computed schema embeddings, and (ii) a SQL Generator fine-tuned in two stages-supervised fine-tuning followed by execution-guided reinforcement-enabling self-correction without costly multi-candidate generation. On BIRD, LitE-SQL achieves 72.10% execution accuracy, and on Spider 1.0 it reaches 88.45%, demonstrating comparable or superior performance to LLM-based methods despite using 2x to 30x fewer parameters. Our findings demonstrate that high-quality Text-to-SQL generation is feasible with lightweight models, offering a practical solution for privacy-sensitive and resource-constrained settings.
academic
LitE-SQL: 벡터 기반 스키마 링킹 및 실행 유도 자체 수정을 갖춘 경량 효율적 텍스트-SQL 프레임워크
텍스트-SQL 작업은 자연어 질문을 SQL 쿼리로 변환하여 비전문가 사용자에게 직관적인 데이터베이스 상호작용 방식을 제공합니다. 대규모 언어 모델(LLM) 기반 방법이 우수한 성능을 보이지만, 독점 모델에 대한 의존성은 배포 가능성 및 데이터 개인정보 보호에 대한 우려를 야기합니다. 본 논문은 두 가지 핵심 구성 요소를 포함하는 경량 효율적 프레임워크인 LitE-SQL을 제안합니다: (i) 스키마 검색기(Schema Retriever)는 사전 계산된 스키마 임베딩의 벡터 데이터베이스를 사용하여 효율적인 스키마 링킹을 수행하고, (ii) SQL 생성기(SQL Generator)는 비용이 많이 드는 다중 후보 생성 없이 두 단계 미세 조정(지도 학습 미세 조정 + 실행 유도 강화 학습)을 통해 자체 수정을 구현합니다. BIRD 데이터셋에서 LitE-SQL은 72.10%의 실행 정확도를 달성하고, Spider 1.0에서는 88.45%를 달성하며, LLM 방법의 1/2에서 1/30의 매개변수만 사용하면서도 동등하거나 우수한 성능을 보입니다.