ChatPaper.aiChatPaper

Reasoning-SQL: 推論を強化したText-to-SQLのためのSQLに特化した部分報酬を用いた強化学習

Reasoning-SQL: Reinforcement Learning with SQL Tailored Partial Rewards for Reasoning-Enhanced Text-to-SQL

March 29, 2025
著者: Mohammadreza Pourreza, Shayan Talaei, Ruoxi Sun, Xingchen Wan, Hailong Li, Azalia Mirhoseini, Amin Saberi, Sercan "O. Arik
cs.AI

要旨

Text-to-SQLは、自然言語理解、データベーススキーマの理解、正確なSQLクエリの構築など、複数の推論を要するサブタスクを含む挑戦的な課題です。既存のアプローチでは、手動で設計された推論パスと帰納的バイアスに依存することが多く、これが全体的な効果を制限する可能性があります。最近のDeepSeek R1やOpenAI o1などの推論能力を強化したモデルの成功に触発され、我々はText-to-SQLタスクに特化した新しい部分報酬セットを提案します。この報酬セットには、スキーマリンキング、AIフィードバック、n-gram類似度、構文チェックが含まれており、強化学習(RL)で一般的な報酬の希薄性の問題に対処するために明示的に設計されています。グループ相対ポリシー最適化(GRPO)を活用することで、我々のアプローチは大規模言語モデル(LLM)が正確なSQLクエリ生成に必要な内在的な推論スキルを発展させることを明示的に促進します。異なるサイズのモデルを用いて、提案された報酬を用いたRLのみのトレーニングが、教師ありファインチューニング(SFT)と比較して一貫して高い精度と優れた汎化性能を達成することを示します。特に、我々のRLでトレーニングされた14Bパラメータモデルは、BIRDベンチマークにおいて、より大規模なプロプライエタリモデル(例:o3-miniを4%、Gemini-1.5-Pro-002を3%上回る)を大幅に上回りました。これらは、Text-to-SQLタスクにおける精度と推論能力を向上させるための提案されたRLトレーニングフレームワークと部分報酬の有効性を強調しています。
English
Text-to-SQL is a challenging task involving multiple reasoning-intensive subtasks, including natural language understanding, database schema comprehension, and precise SQL query formulation. Existing approaches often rely on handcrafted reasoning paths with inductive biases that can limit their overall effectiveness. Motivated by the recent success of reasoning-enhanced models such as DeepSeek R1 and OpenAI o1, which effectively leverage reward-driven self-exploration to enhance reasoning capabilities and generalization, we propose a novel set of partial rewards tailored specifically for the Text-to-SQL task. Our reward set includes schema-linking, AI feedback, n-gram similarity, and syntax check, explicitly designed to address the reward sparsity issue prevalent in reinforcement learning (RL). Leveraging group relative policy optimization (GRPO), our approach explicitly encourages large language models (LLMs) to develop intrinsic reasoning skills necessary for accurate SQL query generation. With models of different sizes, we demonstrate that RL-only training with our proposed rewards consistently achieves higher accuracy and superior generalization compared to supervised fine-tuning (SFT). Remarkably, our RL-trained 14B-parameter model significantly outperforms larger proprietary models, e.g. o3-mini by 4% and Gemini-1.5-Pro-002 by 3% on the BIRD benchmark. These highlight the efficacy of our proposed RL-training framework with partial rewards for enhancing both accuracy and reasoning capabilities in Text-to-SQL tasks.

Summary

AI-Generated Summary

PDF94April 2, 2025