arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2509.04657cs.CLcs.AIcs.DBcs.LG
收藏

通过SQL2NL评估NL2SQL

Evaluating NL2SQL via SQL2NL

Oracle AI

Mohammadtaher Safarzadeh, Afshin Oroojlooyjadid, Dan Roth

AI总结:

本研究提出基于SQL2NL的模式对齐释义框架,单独评估NL2SQL模型对语言变异的鲁棒性,发现现有先进模型脆弱性远超标准基准表现,且鲁棒性下降受模型规模、查询复杂度等多因素影响。

摘要:

在语言变异存在的情况下实现稳健评估,是理解自然语言转SQL(NL2SQL)模型泛化能力的关键,但现有基准很少以系统化或可控的方式考量这一因素。我们提出一种新颖的模式对齐释义框架,利用SQL转自然语言(SQL2NL)自动生成语义等价、词汇多样的查询,同时保持与原始模式和意图的一致性。这首次实现了针对NL2SQL对语言变异鲁棒性的单独评估——与以往主要研究歧义或模式扰动的工作不同。我们的分析表明,最先进的模型比标准基准显示的要脆弱得多。例如,LLaMa3.3-70B在经过释义的Spider查询上执行准确率下降10.23%(从77.11%降至66.9%),而LLaMa3.1-8B的降幅更大,接近20%(从62.9%降至42.5%)。更小的模型(如GPT-4o mini)受到的影响不成比例地更大。我们还发现,鲁棒性下降幅度随查询复杂度、数据集和领域的不同而有显著差异——这凸显了需要能明确衡量语言泛化能力的评估框架,以确保模型在真实场景中的性能可靠。

英文摘要:

Robust evaluation in the presence of linguistic variation is key to understanding the generalization capabilities of Natural Language to SQL (NL2SQL) models, yet existing benchmarks rarely address this factor in a systematic or controlled manner. We propose a novel schema-aligned paraphrasing framework that leverages SQL-to-NL (SQL2NL) to automatically generate semantically equivalent, lexically diverse queries while maintaining alignment with the original schema and intent. This enables the first targeted evaluation of NL2SQL robustness to linguistic variation in isolation-distinct from prior work that primarily investigates ambiguity or schema perturbations. Our analysis reveals that state-of-the-art models are far more brittle than standard benchmarks suggest. For example, LLaMa3.3-70B exhibits a 10.23% drop in execution accuracy (from 77.11% to 66.9%) on paraphrased Spider queries, while LLaMa3.1-8B suffers an even larger drop of nearly 20% (from 62.9% to 42.5%). Smaller models (e.g., GPT-4o mini) are disproportionately affected. We also find that robustness degradation varies significantly with query complexity, dataset, and domain -- highlighting the need for evaluation frameworks that explicitly measure linguistic generalization to ensure reliable performance in real-world settings.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑