TL;DR
GRAFT revolutionizes table retrieval in data lakes by treating it as a structured graph-matching problem rather than scoring tables in isolation. By combining an information-theoretic reward function with offline reinforcement learning, GRAFT ensures that LLM data agents receive a complete, interconnected, and non-redundant set of tables necessary to answer complex analytical queries accurately and efficiently.
What Problem Does This Paper Address?
Autonomous data agents powered by Large Language Models (LLMs) excel at answering natural language queries, but their reasoning is only as good as the evidence they retrieve. When dealing with tabular "data lakes"—massive, uncurated repositories of structured tables—traditional retrieval methods fall short.
Existing approaches typically score and retrieve tables independently (point-wise retrieval). However, real-world analytical queries rarely reside in a single table. Data in a lake is often fragmented across heterogeneous sources, requiring multiple tables to be stitched together via joins or unions to form a complete answer. If a retrieval system misses a critical "bridge table" (which might lack query keywords but connects two highly relevant tables), the downstream LLM agent receives disconnected fragments it cannot integrate. Furthermore, analytical queries involving aggregations (like SUM or COUNT) require a population-complete, non-redundant set of evidence; retrieving duplicate or near-duplicate tables will systematically bias the final answer.
Methods
The authors introduce GRAFT (Graph-matched Retrieval and Fusion of Tables), which tackles these challenges through a multi-pronged architecture:
- Graph Matching Formulation: Instead of treating queries as a flat set of keywords, GRAFT uses an LLM to distill the user's query into an Intent Graph ($G_I$), structured as a hierarchy of entities, attributes, and values. The data lake is modeled as a massive Data Lake Graph ($G_D$), where nodes represent tables, columns, and values, and edges represent schema containment, joinability, and unionability. Table retrieval is then elegantly reframed as finding a connected subgraph in $G_D$ that satisfies a homomorphism from $G_I$.
- Information-theoretic Graph Matching Score (IGMS): To evaluate candidate subgraphs, the authors designed IGMS, a mathematically rigorous log-determinant reward function. Inspired by Gaussian-process information gain, IGMS couples three essential signals into a single objective: semantic relevance, structural compatibility (ensuring valid join/union paths), and evidence diversity (penalizing redundant columns using Jaccard similarity).
- Offline Value Learning via IQL: Finding the optimal subgraph is an NP-hard problem with an exponentially large search space. GRAFT recasts subgraph generation as a Markov Decision Process (MDP). Because data lakes lack labeled query-trajectory pairs, the authors invented a canonical compression operator that inverts the graph-matching process, allowing them to automatically self-generate 200K diverse training trajectories directly from the data lake. They then train a value function using Implicit Q-Learning (IQL) to guide the search.
- Multi-Stage Online Pruning: At inference time, GRAFT deploys a three-stage pipeline to maintain high efficiency:
- Anchor Reachability: Narrows the search to an $(L-1)$-hop structural closure around initial semantic seeds.
- Predicate Admissibility: Uses the learned Q-function to guide a beam search, filtering out structurally invalid actions.
- Reward Monotonicity: Leverages the submodular properties of IGMS to perform lazy evaluation via a Minoux-style priority queue, drastically reducing exact computation costs.
Datasets
GRAFT was evaluated across two distinct tasks using three primary benchmarks:
- Table Q&A: The authors adapted the popular Text-to-SQL datasets Spider and BIRD to a data lake setting. Tables from all databases were pooled together, primary/foreign key constraints were stripped, and tables were row-sharded to introduce challenging unionable pairs.
- Training Data Enrichment: Evaluated on the Open Data table search corpus, consisting of 11,345 tables. The goal here was to retrieve additional attributes and instances to improve the accuracy of downstream machine learning models.
Key Insights and Ideas
- Tables are Relational, Not Textual: The core philosophical shift in GRAFT is treating table retrieval as a structural synthesis problem rather than a document retrieval problem. A table's utility is defined by how it connects to other tables.
- Principled Diversity over Heuristics: Instead of using arbitrary linear combinations to balance relevance and diversity, GRAFT uses the log-determinant of an information matrix. This naturally down-weights redundant data while ensuring structural paths remain intact.
- Data Lakes as Self-Supervisors: By realizing that an intent graph is a compressed version of a data subgraph, the authors bypassed the need for expensive human annotations. Generating synthetic training data by sampling subgraphs and compressing them into "pseudo-queries" is a highly scalable paradigm for data lake tasks.
Key Results
GRAFT demonstrated superior performance over point-wise, greedy-expansion, and structure-aware baselines:
- Accuracy and Sufficiency: On Spider and BIRD, GRAFT achieved the highest Recall, Precision, F1, and Sufficiency. Notably, it achieved a 7.8% relative gain in F1 and a 10.6% relative gain in Sufficiency over the strongest structure-aware baseline (JAR).
- Downstream Impact: In data enrichment tasks, the non-redundant tables retrieved by GRAFT led to the lowest RMSE in regression tasks and the highest accuracy in classification tasks.
- Search Efficiency: Despite solving a complex combinatorial problem, GRAFT completed searches in 3.5 seconds per query on average—on par with simple greedy methods and significantly faster than the next best structure-aware baseline, JAR, which took 22.4 seconds.
Limitations and Future Work
- LLM Dependency for Intent Extraction: GRAFT relies on a frontier-class LLM (like GPT-5-mini) to generate the initial intent graph. If the LLM misinterprets the user's query structure, the downstream retrieval will suffer.
- Future Extensions: The authors plan to extend GRAFT to handle multi-modal data lakes (containing text and images alongside tables) and explore end-to-end joint training of the retriever directly with a downstream SQL executor.
Summary updated