🤖 AI Summary
This work addresses the challenge of accurate schema linking in Text-to-SQL tasks under complex database schemas, where existing methods are limited by implicit handling or reliance on static supervision signals. The authors propose ACE-SQL, a framework that jointly optimizes schema retrieval and SQL generation through reinforcement learning. It dynamically constructs a column candidate pool using execution feedback and adaptively assigns retrieval targets based on correctly executed trajectories, enabling bidirectional co-optimization between the retriever and generator. A novel experience-based credit assignment mechanism is introduced to generate retrieval targets online that align with the current policy, facilitating end-to-end adaptive training. Using only approximately 3k synthetic examples, ACE-SQL achieves a greedy execution accuracy of 65.3% on the BIRD Dev set, with an average output of 0.93k tokens per query.
📝 Abstract
Text-to-SQL maps natural language questions to executable SQL queries. Modern databases often contain large and complex schemas, making schema linking a critical step for accurate SQL generation. Existing methods either rely on full-schema generation, which leaves schema linking implicit within a large search space, or use a separate retriever trained with static gold-column supervision, whose targets may be suboptimal for the current generator policy. To address this issue, we propose Adaptive Co-optimization via Empirical Credit Assignment for Text-to-SQL (ACE-SQL), a reinforcement learning (RL) framework that jointly optimizes schema retrieval and SQL generation under execution feedback. ACE-SQL constructs an online column-set pool from generator rollouts and derives adaptive on-policy retrieval targets from the column set most frequently associated with execution-correct rollouts. This induces bidirectional adaptation, where the retriever adapts toward column sets that the generator can execute correctly, while the generator adapts to the retriever's evolving schema selections under execution feedback. With approximately 3k synthetic Text-to-SQL question-database pairs for RL training, ACE-SQL achieves 65.3% greedy execution accuracy on BIRD Dev while using 0.93k output tokens per query. The repository is available at https://github.com/xbchen1/ACE-SQL.