Skip to content
Open access

HyMIR: A BI-Inspired Hybrid Intermediate Representation for Schema-Agnostic Text-to-SQL

2026 · IEEE Access · Vol 14, pp. 110097-110108 · 0 citations · 23 references
Computer Science

TL;DR

This work revisits generation-target IRs under the BIRD regime and proposes HyMIR, a typed JSON IR designed for enterprise-scale schemas, indicating comparable representational coverage across the two benchmarks and quantifying a hard upper bound on attainable model performance under this IR and compiler stack.

Abstract

BIRD is a recent enterprise-scale Text-to-SQL benchmark that exposes a regime not covered by earlier datasets such as Spider: it consists of 95 real-world databases, which on average contain seven tables each, with abbreviated column names, dense foreign key graphs, and noisy domain values. Generation-target intermediate representations (IRs) such as SemQL and NatSQL, which reduce the model’s output space to a structured plan and rely on a deterministic compiler to reconstruct full SQL, were developed before BIRD and evaluated mainly on Spider-like schemas. As a result, most subsequent BIRD-era work on Text-to-SQL has shifted toward prompt and pipeline engineering, while leaving the choice of generation target—raw SQL versus IR—largely unexamined for large, messy enterprise databases. In this work, we revisit generation-target IRs under the BIRD regime and propose HyMIR, a typed JSON IR designed for enterprise-scale schemas. HyMIR removes high-error structural clauses—JOIN, GROUP BY, and the SELECT projection—from the model’s output and delegates their reconstruction to a compiler that infers join paths from the foreign key graph, while a predicate passthrough channel carries the long tail of fragments that resist abstraction, including LIKE predicates, range bounds, nested IN subqueries, and dialect-specific date functions. To isolate the effect of the IR itself, we compare HyMIR against standard SQL as the generation target under strictly matched conditions: identical training data, backbone (Qwen-2.5-Coder-7B-Instruct), fine-tuning recipe (DoRA), and sampling protocol. On the BIRD development set, HyMIR improves execution accuracy from 52.50% to 55.48% under raw decoding and from 56.81% to 58.44% with $N{=}11$ result-set self-consistency. Across model scales (1.5B, 3B, 7B), the gains exhibit a mid-scale sweet spot—largest at 3B, with improvements of roughly + 11 points, and smaller but consistently positive at 7B—such that a 3B HyMIR model approaches the performance of a 7B SQL-tuned model while using fewer than half the parameters. Finally, a compiler-only oracle round-trip, which encodes gold SQL into HyMIR and compiles back, achieves 92.83% execution accuracy on BIRD and 91.0% on Spider, indicating comparable representational coverage across the two benchmarks and quantifying a hard upper bound on attainable model performance under this IR and compiler stack.

Read PDF

Similar papers

Open access 2026

SchemaScope: How Join-Hop Depth Breaks Text-to-SQL in Large Language Models, and a Decomposition-Based Remedy

Error analysis shows that decomposition eliminates wrong join path errors—the dominant failure mode at high h —and shifts the residual error budget toward condition and aggregation mistakes that are amenable to existing post-processing methods.

Kaustubh S. Bukkapatnam, R. Malik · 0 citations

ExpeSQL: An Efficient, Experience-Guided Decompositional Search Framework for Text-to-SQL

This work introduces ExpeSQL, a zero-shot, open-source–compatible, and efficient framework that combines divide-and-conquer reasoning, Best-of-N candidate selection, and self-critique with experience-guided refinement that establishes a new paradigm for deployable, self-improving Text-to-SQL systems in dynamic, real-world environments.

Unknown authors · 0 citations
Preprint Jul 2026

Spider 2.0-AIFunc: Extending Real-World Text-to-SQL to AI-Native SQL Workflows

Major cloud data platforms now expose large language model capabilities as native SQL functions, enabling analysts to perform classification, filtering, sentiment analysis, extraction, similarity search, and aggregation within ordinary SQL queries. Yet existing text-to-SQL benchmarks evaluate only conventional SQL and provide no signal on whether models can generate such AI-native SQL. We introduce Spider 2.0-AIFunc, a benchmark of 465 verified instances across 125 real-world databases covering six types of AI functions on the Snowflake platform. Starting from an existing enterprise text-to-SQL benchmark, we construct Spider 2.0-AIFunc through an agent-based pipeline that rewrites source tasks into AI-native form, simultaneously transforming target queries and refining natural language instructions to make the intended AI-native solution explicit and reduce ambiguity. All instances pass a multi-round repeated execution protocol across temporally separated windows to confirm result stability before release. Evaluating ten state-of-the-art language models, we find that the strongest proprietary models reach 67-70% execution accuracy while the best open-source model achieves 58.1%, a gap driven primarily by errors in predicate specification, schema grounding, and AI function parameterization. Agent frameworks designed for traditional text-to-SQL challenges, such as schema retrieval and relevant table selection, do not transfer effectively to AI-native SQL: a minimal agent setup consistently matches or outperforms more elaborate alternatives, suggesting that the strategies these frameworks employ are less critical in this setting. Data are available at https://github.com/Leolty/Spider2-AIFunc .

Tianyang Liu, Canwen Xu, Fangyu Lei et al. · 0 citations
Conference Open access 2026

Beyond Context Windows: Data Transformations at Scale with LLMs

A framework for scalable, dataset-scale LLM-based data transformation that processes data row-by-row in batches over lazily evaluated, distributed dataframes, enabling LLM-based transformations on arbitrarily large datasets without loading them into memory.

A. Abraham, F. Rahman, Fadil Rahman et al. · 0 citations
Book Open access Aug 2026

Automating End-to-End Hybrid Query Processing: Benchmark, Solution, and Insights

A large-scale benchmark with 60\sim 90× more queries than prior work, built on 3× more databases, an automated pipeline that can execute existing methods without manual intervention, and multi-dimensional, fine-grained evaluation metrics for comprehensive assessment.

Bo Li, Chenzhan Wang, Longkang Lin et al. · 0 citations
Preprint Aug 2026

Iteration Without Elaboration: A Simple ReAct Architecture Suffices for Text-to-SQL Generation

A simple yet effective zero-shot ReAct-style framework built solely on iterative reasoning and a constrained action space defined by a typed Domain-Specific Language (DSL) of 15 relational operations, rather than free-form SQL generation.

Jian Lu, Haiwei Yu, Raymond M. Xiong et al. · 0 citations