arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.00660cs.DBcs.AI
收藏

流式模型级联用于语义SQL

Streaming Model Cascades for Semantic SQL

Snowflake Inc.(雪花公司)

Paweł Liskowski, Kyle Schmaus

AI总结:

本文提出两种流式模型级联算法,用于在分布式系统中高效处理语义SQL查询,通过迭代阈值优化和联合精度召回保证提升效率与质量。

摘要:

现代数据仓库通过语义运算符扩展SQL,但每行推理成本过高。模型级联通过快速代理模型处理大部分行,将不确定情况委托给昂贵的Oracle。现有框架需全局数据访问且仅优化单一质量指标,限制了分布式系统应用。本文提出两种适应性级联算法,支持流式处理和分区执行。SUPG-IT扩展统计框架至流式执行,通过迭代阈值优化和联合精度召回保证。GAMCAL用学习校准模型替代用户指定的质量目标,通过通用加性模型将代理得分映射为校准概率,实现成本质量权衡的单参数优化。实验表明两种算法在六个数据集上均达到F1>0.95。GAMCAL在成本敏感点实现更高F1,SUPG-IT则在精度召回上有形式保证。

英文摘要:

Modern data warehouses extend SQL with semantic operators that invoke large language models on each qualifying row, making per-row inference orders of magnitude more expensive than traditional SQL. Model cascades reduce this cost by routing most rows through a fast proxy model and delegating uncertain cases to an expensive oracle. Prior SUPG-style cascades, however, require a global proxy-score pass that is itself an LLM-inference workload and blocks output in pipelined query engines. They also target either precision or recall and cannot serve workloads that need both. We formalize the cascade routing problem for streaming semantic SQL with independent parallel workers and present two complementary algorithms within this model. SUPG-IT extends SUPG from single-pass, single-metric estimation to streaming execution by iteratively refining two thresholds as oracle labels accumulate across batches, and is the first streaming cascade with joint probabilistic guarantees on user-specified precision and recall at a chosen failure probability $δ$. GAMCAL replaces user-specified targets with a single tradeoff parameter $α$ between classification error and oracle cost, and learns a monotone Generalized Additive Model that calibrates proxy scores to true-positive probabilities and supplies pointwise uncertainty for stochastic routing. On six classification, filtering, and join benchmarks evaluated in a production semantic SQL engine, both algorithms reach $F_1 \geq 0.95$ at their best operating points. GAMCAL also leads all six datasets at a 20% delegation budget and reaches $F_1 \geq 0.95$ with up to 58% fewer oracle calls than LOTUS's SUPG cascade. SUPG-IT attains the highest best-case $F_1$, with a mean of 0.989 across the six datasets.

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

↑