Abstract: The open-domain text-to-SQL task aims to retrieve question-relevant tables from massive databases and generate SQL. However, the performance of current methods is constrained by single-hop retrieval, and existing multi-hop retrieval of open-domain question answering is not directly applicable due to the tendency to retrieve tables similar to the retrieved ones but irrelevant to the question. Since the questions in text-to-SQL usually contain all required information, while previous multi-hop retrieval supplements the questions with retrieved documents. Therefore, we propose the multi-hop table retrieval with removal (MURRE), which removes previously retrieved information from the question to guide the retriever towards unretrieved relevant tables. Our experiments on two open-domain text-to-SQL datasets demonstrate an average improvement of 5.7% over the previous state-of-the-art results.
Introduction
In open-domain text-to-SQL, systems must navigate massive databases to find the specific tables required to answer a natural language query. Traditional approaches rely on "single-hop" retrieval, which often fails when a query necessitates joining multiple tables. While multi-hop retrieval is common in Open-Domain Question Answering (QA), it typically works by supplementing the original question with retrieved context.
In the context of SQL, however, this supplementation often leads to "semantic drift." Because the user's question already contains all necessary constraints, adding information about a retrieved table (e.g., "Employee") often causes the retriever to find other similar tables (e.g., "Staff") rather than the distinct tables needed for a join (e.g., "Bonus").
The MURRE Framework
To address this, we introduce MURRE (MUlti-hop table Retrieval with REmoval). Instead of adding context, MURRE iteratively removes satisfied information from the query to focus the retriever on the remaining missing components.
The process follows a structured pipeline:
- Retrieval Phase: The system calculates similarity between the current question and database tables using dense embeddings (SGPT). It employs a beam search strategy to maintain multiple potential retrieval paths, reducing the risk of early errors.
- Removal Phase: A Large Language Model (LLM) identifies which parts of the question are satisfied by the currently retrieved tables. It then rewrites the question by removing these parts, effectively narrowing the search space for the next hop.
- Early Stopping: If the LLM determines that all necessary tables have been found, it triggers an "Early Stop" to prevent unnecessary computation.
Query Removal vs. Query Supplement
The core innovation of MURRE is the shift from query expansion to query reduction. In standard multi-hop QA, supplementing the query provides context for ambiguous questions. In text-to-SQL, questions are usually self-contained.
As illustrated above, when a system supplements the query with the "Employee" table, the retriever is distracted by the semantic similarity and retrieves the "Staff" table. By contrast, MURRE's removal strategy strips away the "employee" constraint, forcing the retriever to focus on the "bonus" keyword, which leads directly to the correct "Bonus" table.
Experimental Evaluation
We evaluated MURRE on two major open-domain benchmarks: SpiderUnion and BirdUnion. These datasets require searching across all tables in a database, making them significantly more challenging than standard text-to-SQL tasks.
Key findings include:
- Performance: MURRE achieved a 5.7% average improvement in recall and complete recall over previous state-of-the-art methods.
- Complexity Handling: The gains were most significant for "Hard" and "Extra Hard" queries, where multi-table joins are essential.
- Ablation Studies: Removing the "Removal" component resulted in the most significant performance drop, confirming that query reduction is the primary driver of the system's success.
Conclusion
MURRE demonstrates that in self-contained tasks like text-to-SQL, "less is more." By removing satisfied constraints from a query, the system avoids semantic drift and more accurately navigates complex database schemas. Future work will explore adapting this removal strategy to multi-turn conversational SQL and incorporating execution feedback to further refine table retrieval.
Summary updated