EGREFINE: An Execution-Grounded Optimization Framework for Text-to-SQL Schema Refinement

📅 2026-05-01
📈 Citations: 0
Influential: 0
📄 PDF

career value

178K/year
🤖 AI Summary
This work addresses the significant performance degradation of Text-to-SQL models caused by ambiguous, abbreviated, or inconsistent column names in real-world databases. It formalizes schema renaming as a constrained optimization problem and introduces a four-stage, context-aware renaming pipeline. The approach integrates column-level greedy decomposition, execution-guided validation, and non-destructive materialization via SQL views to guarantee both column-level fidelity and database-wide query equivalence. Evaluated across multiple benchmarks, the method effectively recovers accuracy lost due to naming noise, safely rejects optimization requests beyond the model’s current capabilities, and produces renamed schemas that are transferable and reusable across different Text-to-SQL models.
📝 Abstract
Text-to-SQL enables non-expert users to query databases in natural language, yet real-world schemas often suffer from ambiguous, abbreviated, or inconsistent naming conventions that degrade model accuracy. Existing approaches treat schemas as fixed and address errors downstream. In this paper, we frame schema refinement as a constrained optimization problem: find a renaming function that maximizes downstream Text-to-SQL execution accuracy while preserving query equivalence through database views. We analyze the computational hardness of this problem, which motivates a column-wise greedy decomposition, and instantiate it as EGRefine: a four-phase pipeline that screens ambiguous columns, generates context-aware candidate names, verifies them through execution-grounded feedback, and materializes the result as non-destructive SQL views. The pipeline carries two structural properties: column-local non-degradation, ensured by the conservative selection rule in the verification phase, and database-level query equivalence, ensured by the view-based materialization phase. Together they make the resulting refinement safe by construction at the column level, with cross-column and prompt-level interactions handled empirically rather than analytically. Across controlled schema-degradation, real-world, and enterprise benchmarks, EGRefine recovers accuracy lost to schema naming noise where applicable and correctly abstains where the underlying task exceeds current Text-to-SQL capabilities, with refined schemas transferring across model families to enable refine-once, serve-many-models deployment. Code and data are publicly available at https://github.com/ai-jiaqian/EGRefine.
Problem

Research questions and friction points this paper is trying to address.

Text-to-SQL
schema refinement
naming ambiguity
execution accuracy
database views
Innovation

Methods, ideas, or system contributions that make the work stand out.

schema refinement
Text-to-SQL
execution-grounded optimization
database views
query equivalence