EUVIMEDEUVIMED entdecken
Open Access · CC BY 4.0

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

Wei-Heng Chen, Ying-Ren Chien

IEEE Access · 2026 · 14 · 110097-110108

DOI: 10.1109/access.2026.3712824 ↗

Kurz gefasst

Fachartikel in der Zeitschrift IEEE Access, 2026. Verfasst von Wei-Heng Chen und 1 weiteren Autor:innen. Die Arbeit nennt 24 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0). Gefördert von: National Science and Technology Council (NSTC), Taiwan,.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

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.

Förderung

  • National Science and Technology Council (NSTC), Taiwan,

Zitieren

APA

Chen, W., & Chien, Y. (2026). HyMIR: A BI-Inspired Hybrid Intermediate Representation for Schema-Agnostic Text-to-SQL. IEEE Access, 14, 110097-110108. https://doi.org/10.1109/access.2026.3712824

Vancouver

Chen W, Chien Y. HyMIR: A BI-Inspired Hybrid Intermediate Representation for Schema-Agnostic Text-to-SQL. IEEE Access. 2026;14:110097-110108. doi:10.1109/access.2026.3712824

BibTeX
@article{Chen2026,
  author = {Chen, Wei-Heng and Chien, Ying-Ren},
  title = {HyMIR: A BI-Inspired Hybrid Intermediate Representation for Schema-Agnostic Text-to-SQL},
  journal = {IEEE Access},
  year = {2026},
  volume = {14},
  pages = {110097--110108},
  doi = {10.1109/access.2026.3712824}
}
Kostenlos starten →