要約
大規模な言語モデル(LLM)は、リレーショナルデータベースに関する自然言語の質問をSQLクエリに変換する際に印象的な機能を示しています。
最近の改善にもかかわらず、小さなLLMSは、ゼロショット学習(ZSL)設定の下で、複数のテーブルと複雑なSQLパターンを含む質問を処理するのに苦労しています。
監視された微調整(SFT)は、前提条件のモデルの知識の欠陥を部分的に補償しますが、マルチホップの推論を含むクエリに対処しながら不足しています。
このギャップを埋めるために、SFTの推論トレースを含むZSL内の思考プロセスを活用したり、強化学習(RL)戦略を採用するなど、ZSL内の思考プロセスを活用することから、推論能力を強化するためのさまざまなLLMトレーニング戦略が提案されています。
ただし、Text2SQLのパフォーマンスに対する推論の影響は、依然としてほとんど説明されていません。
このペーパーでは、LLMの推論機能が4つのベンチマークデータセットでText2SQLパフォーマンスにどの程度影響するかを調査します。
この目的のために、次のLLM設定を考慮します。(1)ZSL、一般的な推論を含むかどうか。
(2)SFT、タスク固有の推論トレースを持つ場合とない場合。
(3)RL、プライマリ報酬関数としての実行精度を活用します。
(4)SFT+RL、つまり、SFTとRLを組み合わせた2段階のアプローチ。
結果は、ZSLの下での汎用推論が、複雑なText2SQLのケースに取り組むのに効果がないことが証明されていることを示しています。
小さなLLMSは、SFTの恩恵を受けて、より大きなものよりもはるかに多くの推論であり、(弱い)モデルの事前削除のギャップを埋めます。
RLは一般に、特にSQLクエリにマルチホップの推論と複数のテーブルが含まれる場合、テストされたすべてのモデルとデータセットで有益です。
SFT+RLの小さなLLMSは、推論プロセスの一般性と実行精度の最適化との戦略的バランスのおかげで、ほとんどの複雑なデータセットで優れています。
RLのおかげで、The7B Qwen-Coder-2.5モデルは、鳥のデータセットで1,000億以上のモデルと同等の性能を発揮します。
要約(オリジナル)
Large Language Models (LLMs) have shown impressive capabilities in transforming natural language questions about relational databases into SQL queries. Despite recent improvements, small LLMs struggle to handle questions involving multiple tables and complex SQL patterns under a Zero-Shot Learning (ZSL) setting. Supervised Fine-Tuning (SFT) partially compensate the knowledge deficits in pretrained models but falls short while dealing with queries involving multi-hop reasoning. To bridge this gap, different LLM training strategies to reinforce reasoning capabilities have been proposed, ranging from leveraging a thinking process within ZSL, including reasoning traces in SFT, or adopt Reinforcement Learning (RL) strategies. However, the influence of reasoning on Text2SQL performance is still largely unexplored. This paper investigates to what extent LLM reasoning capabilities influence their Text2SQL performance on four benchmark datasets. To this end, it considers the following LLM settings: (1) ZSL, including general-purpose reasoning or not; (2) SFT, with and without task-specific reasoning traces; (3) RL, leveraging execution accuracy as primary reward function; (4) SFT+RL, i.e, a two-stage approach that combines SFT and RL. The results show that general-purpose reasoning under ZSL proves to be ineffective in tackling complex Text2SQL cases. Small LLMs benefit from SFT with reasoning much more than larger ones, bridging the gap of their (weaker) model pretraining. RL is generally beneficial across all tested models and datasets, particularly when SQL queries involve multi-hop reasoning and multiple tables. Small LLMs with SFT+RL excel on most complex datasets thanks to a strategic balance between generality of the reasoning process and optimization of the execution accuracy. Thanks to RL, the7B Qwen-Coder-2.5 model performs on par with 100+ Billion ones on the Bird dataset.
arxiv情報
著者 | Simone Papicchio,Simone Rossi,Luca Cagliero,Paolo Papotti |
発行日 | 2025-04-21 13:05:26+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google