Introduction
Reasoning over tabular data presents a unique challenge for artificial intelligence, often described as a "Goldilocks" problem. Large Language Models (LLMs) typically excel at textual reasoning (e.g., Chain-of-Thought) for understanding linguistic nuances but struggle with precise arithmetic or become overwhelmed by large, noisy datasets. Conversely, symbolic reasoning via Text-to-SQL offers mathematical precision but remains brittle when faced with "fuzzy" natural language queries or unstructured cell data.
H-STAR (Hybrid SQL-Text Adaptive Reasoning) addresses this divide with a novel two-stage framework that combines the strengths of both approaches while significantly reducing computational overhead through aggressive table pruning.
Methodology
H-STAR utilizes a two-stage pipeline designed to provide the LLM with the most relevant evidence for the specific reasoning task required.
Stage A: Multi-View Table Extraction
To avoid feeding entire, often irrelevant tables into the LLM, H-STAR generates a Query-Specific Table ($T_{CR}$) through a "multi-view" filtering process:
- Column Extraction: The system analyzes the table in both its original and transposed forms. Transposition helps the LLM better associate headers with values in wide tables, improving retrieval accuracy. It employs a combination of SQL and text-based retrieval to ensure comprehensive coverage.
- Row Extraction: Relevant rows are identified using SQL queries and subsequently verified through a textual step to capture any data missed by strict SQL filters.
Stage B: Adaptive Reasoning
Once the table is pruned—often by over 80%—an adaptive "router" determines the optimal reasoning path:
- Semantic Path: Used for direct lookups or common-sense questions, relying on standard textual reasoning.
- Symbolic Path: For quantitative or logical tasks, the LLM generates a SQL query to produce intermediate evidence ($E_V$). This evidence is then integrated back into a textual reasoning step to formulate the final natural language response.
Key Insights
- Pruning as Reasoning: Reducing the search space is critical. On the WikiTQ benchmark, H-STAR reduced the average number of processed cells from 159 to just 18, preventing the LLM from being distracted by noise.
- SQL as Evidence: Unlike pure Text-to-SQL methods, H-STAR uses SQL as a high-precision calculator to generate evidence for the LLM to interpret, maintaining natural language flexibility.
- Structural Adaptability: By transposing tables during extraction, H-STAR overcomes the common LLM limitation of failing to map headers to values in complex horizontal layouts.
Results and Performance
H-STAR consistently outperforms state-of-the-art (SOTA) baselines such as Chain-of-Table and DATER across major benchmarks:
- WikiTQ: Achieved 69.56% accuracy with GPT-3.5-Turbo, a 17.7% improvement over vanilla prompting.
- TabFact: Reached 85.03% accuracy, surpassing previous table-manipulation techniques.
- Efficiency: H-STAR is highly resource-efficient, requiring only 6–10 samples to reach peak accuracy, compared to the 50–100 samples required by competing methods like BINDER.
- Robustness: Performance gains were consistent across various model families, including GPT-4o-mini, Gemini-1.5-Flash, and Llama-3-70B.
Conclusion
H-STAR demonstrates that the key to effective tabular reasoning lies in intelligent data pruning and a hybrid approach to logic. By treating SQL as a tool for evidence generation rather than the final output, the framework achieves superior accuracy and efficiency. Future work will focus on expanding these capabilities to multilingual datasets and more complex, non-standard table structures.
Summary updated