TL;DR
Answering complex numerical questions across thousands of unorganized tables (like public data lakes) is a massive challenge for current AI systems. This paper introduces DMRAL, a framework that builds a table relationship graph, decomposes questions into table-aligned sub-questions, and uses execution-guided reasoning to boost table retrieval by 24% and answer accuracy by 55% over state-of-the-art baselines.
What Problem Does This Paper Address?
Multi-Table Question Answering (MTQA) requires finding and combining information from multiple tables to answer a single query. When the query demands a numerical answer (e.g., calculating averages, sums, or conditional aggregations), the difficulty spikes significantly.
Existing solutions generally fall into two buckets, both of which fail at scale:
- Text-to-SQL methods: Designed for clean relational databases. They assume a small number of tables (usually <10) and explicit primary-key/foreign-key (PK-FK) constraints.
- Open-domain Table QA: Usually restricted to single tables or modest corpora (hundreds of tables) and fail to handle complex inter-table relationships like unionability (tables with similar schemas but different rows) and joinability (tables sharing overlapping values without explicit keys).
Real-world data repositories (like web tables or public data lakes) contain tens of thousands of messy, isolated tables with missing metadata or headers. The authors tackle the challenge of performing accurate numerical MTQA over these large-scale, unstructured table collections.
Methods
DMRAL (Decomposition-driven Multi-table Retrieval and Answering framework for Large-scale table collections) splits the problem into an offline preprocessing step and three core online modules:
- Preprocessing & Graph Construction: DMRAL constructs a Table Relationship Graph where nodes represent clusters of unionable tables and edges represent joinability. To combat messy data, it includes a metadata inference module that uses an LLM to fill in missing column headers by analyzing intra-table context.
- Table-Aligned Question Decomposer: Instead of letting an LLM blindly guess how to break down a question, DMRAL extracts specific "information needs" using syntactic parsing, matches them to actual columns using dense embeddings (BGE-M3), and groups them based on the underlying table graph to generate structurally aligned sub-questions.
- Coverage-Aware Retriever: This module uses a two-stage pipeline (coarse retrieval followed by fine-grained ColBERTv2 reranking) to find candidate tables for each sub-question. Crucially, it features a coverage verification function: if it detects a gap in the information needed to answer the full question, it prompts an LLM to generate a "residual sub-question" to fetch missing "bridge" tables.
- Sub-question Guided Reasoner: Rather than writing a massive SQL query or Python script in one shot, the reasoner uses Chain-of-Thought (CoT) prompting to progressively build an executable program step-by-step based on the sub-questions. It then runs the program and uses an execution-guided refinement loop—if the code throws an error, the error message is fed back to the LLM for iterative correction.
Datasets
Because no large-scale benchmarks existed for numerical MTQA, the authors curated two massive new datasets by transforming standard Text-to-SQL benchmarks:
- SpiderWild: 73,688 tables, 274 numerical questions.
- BirdWild: 109,949 tables, 461 numerical questions.
To build these, they took the original databases from Spider and BIRD and applied a three-stage pipeline: decomposing large tables into disjoint subtables (column-wise and row-wise), randomly masking 50% of headers in 20% of the tables to simulate incomplete metadata, and injecting thousands of real-world distractor tables from WebTables and OpenData.
Key Insights and Ideas
- Structure-First Decomposition: LLMs struggle to decompose complex queries in a vacuum. Aligning the question's semantic components with actual table schemas before generating sub-questions drastically reduces redundancy and ensures each sub-query targets a specific table.
- The Power of Residual Questions: Standard retrievers often miss intermediate "bridge" tables because they aren't explicitly mentioned in the user's prompt. Detecting a semantic "coverage gap" and generating a residual query successfully mitigates cascading retrieval failures.
- Progressive Code Generation: For numerical reasoning, generating code (SQL/Python) incrementally based on sub-questions is far more reliable than direct text generation or single-shot code generation, especially when paired with an execution-guided feedback loop.
Key Results
DMRAL was evaluated against strong adapted baselines (JARUnion, MMQAUnion, and OpenSearch-Wild) and demonstrated massive performance leaps:
- Table Retrieval: DMRAL achieved an average 24% improvement in identifying the exact set of relevant tables across all complexity levels.
- Answer Accuracy: DMRAL delivered a staggering 55% average improvement in Arithmetic Exact Match (EM) accuracy.
- Scalability: When scaling the table corpus from 109K to 243K tables, DMRAL remained highly robust, experiencing only a minor 5% drop in retrieval effectiveness while maintaining low query latency.
Limitations and Future Work
- Graph Construction Overhead: Building the Table Relationship Graph offline is computationally expensive. Processing 243K tables took roughly 4.2 days for joinability calculations. The authors plan to address this using distributed engineering techniques (sharding and parallel similarity joins).
- Value Grounding: On the complex BirdWild dataset, some failures occurred because the generated code looked for text strings that didn't perfectly match the exact cell values in the tables. The authors intend to integrate a lightweight value-mapping module into the reasoner to fix this.
Summary updated