Schema-Refiner: Synergizing Knowledge Graphs and LLMs for Proactive Schema Refinement in Text-to-SQL
Jiaqian Wang, Yutao Qi, Wenjin Hou, Yu Pang, Rui Yang
ICLR 2026 submission
Abstract. Text-to-SQL broadens data access but often underperforms in real-world databases. We trace a key cause to lexical–-schema ambiguity, which manifests as homonymy, synonymy, and irregular naming that obscure the mapping between user utterances and schema elements, leading models astray. Prior work primarily deploys interactive, downstream fixes (e.g., robust decoding or clarification), which do not resolve the schema’s intrinsic ambiguity. To mitigate this challenge, we propose Schema-Refiner, a neuro-symbolic framework that (i) builds a schema knowledge graph, (ii) applies community detection to recover column-level context, (iii) uses a large language model to infer canonical semantics, and (iv) synthesizes CREATE VIEW statements, exposing a standardized, disambiguated logical schema layer for direct consumption by downstream Text-to-SQL models. This layer leaves the database untouched; a rule-based rewriter maps queries over the views into equivalent SQL on the original schema. To evaluate robustness to lexical–schema ambiguity and the effectiveness of our approach, we construct Amb-Spider by injecting ambiguities into Spider with human-verified annotations. Across multiple state-of-the-art Text-to-SQL systems, Amb-Spider consistently reduces execution accuracy. When paired with Schema-Refiner, these systems better detect ambiguities and regain a large share of the lost accuracy.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperadd · history
Loading the discussion…