Source-linked AI summary
H2Table: Hierarchical Hypergraph-Enhanced Large Language Models for Complex Table Reasoning
Jia Ling, Yangfan Wang, Chen Tang, Haoming Tan, Yang Yang, Yi Guan, Jingchi Jiang
TL;DR
Complex-table reasoning is difficult for LLMs because sequence linearization overlooks two-dimensional and hierarchical structure. H2Table represents tables as hierarchical nested hypergraphs, encodes cross-level header–cell dependencies, and uses learnable queries to transfer structural embeddings into an LLM. It reports a 22.88% average improvement over state-of-the-art baselines on HiTab tables with nesting depth four.
Problem
Existing LLM approaches typically linearize tables into sequences, overlooking their intrinsic two-dimensional and hierarchical structure in complex table reasoning.
Method
H2Table maps complex tables into hierarchical nested hypergraphs, applies hierarchy-aware message passing, and uses learnable query vectors to extract structural embeddings for the LLM.
Results
22.88% average relative improvement over competing baselines is reported on deep hierarchical tables, with H2Table consistently outperforming baselines across multiple datasets.
Takeaways & Limitations
H2Table enables medium-sized models fine-tuned with lightweight structural alignment to achieve competitive complex-table reasoning performance.
Takeaways & Limitations
The framework assumes header hierarchies are accurately available beforehand and still feeds serialized tabular text into the LLM.
Abstract
from arXiv · showhide
Tables are ubiquitous across diverse domains, yet reasoning over them remains a significant challenge for modern large language models (LLMs). Current approaches typically linearize tables into sequences, inherently overlooking their intrinsic two-dimensional and hierarchical structure. To address this, we propose H2Table (Hierarchical Hypergraph-Enhanced Table Reasoning), a novel framework that represents complex tables as hierarchical nested hypergraphs. To process this representation, we design a tailored hypergraph encoder to facilitate message passing between hyperedges (headers) and nodes (cells), thereby perceiving the semantic entailment relationships between them within complex tables. Furthermore, we introduce a set of learnable query vectors acting as a lightweight bridge to extract representative structural embeddings from the encoder into the LLM. Experimental results demonstrate that our approach effectively handles complex table question answering tasks with hierarchical nested headers. Notably, on the HiTab dataset, H2Table achieves an average improvement of 22.88% over state-of-the-art baselines on highly complex tables with a nesting depth of four. Our code is available at: https://github.com/lila120/h2table.
1 Introduction
H2Table addresses structural and computational limitations in complex-table reasoning by combining hierarchical nested hypergraphs, hierarchy-aware message passing, and learnable query-based alignment with an LLM. Experiments report robust gains over competing baselines, especially on deeply hierarchical tables.
- Motivation: Table reasoning supports downstream applications such as TableQA and Text-to-SQL, motivating the use of LLM semantic synthesis and reasoning capabilities.
- Limitations of Existing Methods: Existing 1D serialization and full-parameter fine-tuning require massive high-quality datasets and prohibitive computation, while standard graphs miss one-to-many header–cell relationships.
- H2Table: H2Table maps complex tables into hierarchical nested hypergraphs and uses a four-stage encoder to preserve semantic entailment and enable interactions across header levels.
- H2Table: A compact set of learnable query vectors extracts task-beneficial structural features and supplies them to the LLM through a Soft Structure Prompt.
- Efficiency: H2Table uses lightweight LoRA rather than costly full-parameter tuning, with comparable or superior performance and minimal computational overhead.
- Results: 22.88% average relative improvement is achieved on deep hierarchical tables, while fine-tuned medium-sized models eclipse hundred-billion-parameter models.
2 Related Work
Prior table-reasoning methods serialize tables, tune LLMs, or encode topology with graphs and hypergraphs, but face data, context, structural, or complexity limitations. H2Table uses learnable queries to compress complex structural and semantic information for LLM alignment.
- LLM-based Table Reasoning: LLM table-reasoning methods commonly use instruction tuning or prompt engineering over serialized tables, but these approaches incur data, computation, or context-window limitations.
- LLM-based Table Reasoning: Flattening tables into sequences disrupts intrinsic topological structure, especially for complex or nested tables.
- Graph-based Table Reasoning: Conventional graphs struggle with one-to-many header–cell correlations, while hypergraph methods support higher-order links but may be restricted to flat tables or lack LLM integration.
- Graph-based Table Reasoning: TAMO integrates a hypergraph encoder with LLMs but flattens complex nested headers into coarse-grained hyperedges, overlooking multi-level dependencies.
- Cross-modal Feature Alignment: Learnable query vectors perform cross-attention with graph embeddings to actively extract and compress global topological and semantic features for alignment.
3 Method
H2Table models complex tables as hierarchical nested hypergraphs and uses hierarchy-aware message passing to encode dependencies between headers and cells. Learnable queries then distill these structural embeddings into fixed-length soft prompts for LLM reasoning.
- 3.1 Modeling Complex Tables as Hierarchical Nested Hypergraphs: H2Table represents a table as a hierarchical nested hypergraph containing data-cell nodes, header hyperedges, a global root, hierarchical relations, and leaf-header incidence relations.The hyperedge set is partitioned into leaf and high-level headers, with the root included among high-level headers.
- 3.3 Query-Based Parameter-Efficient Feature Alignment: The distilled query embeddings become soft structural prompts prepended to serialized table text before the combined input is fed to the LLM.The module produces a fixed number of tokens regardless of table complexity, reducing sequence expansion and contextual burden.
- 3.1 Modeling Complex Tables as Hierarchical Nested Hypergraphs: Parent hyperedges recursively aggregate the scopes of descending sub-headers, allowing high-level headers to perceive information down to individual cells.Leaf-header scopes come from cell incidence, while high-level scopes are built from their children’s scopes.
- 3.2 Hierarchy-Aware Hypergraph Encoder: The hierarchy-aware encoder performs four stages: vertex-to-edge, child-to-parent, parent-to-child, and edge-to-vertex message passing.These stages combine cell–header aggregation with bottom-up and top-down propagation among header levels.
- 3.3 Query-Based Parameter-Efficient Feature Alignment: A query-based alignment module uses self-attention and cross-attention to extract representative structural features from encoder outputs.The learnable queries are optimized end-to-end and projected through a feed-forward network after cross-modal fusion.
- 3.3 Query-Based Parameter-Efficient Feature Alignment: Updating merely 1% of the parameters is described as achieving performance comparable to full fine-tuning while reducing computational costs.The paper also associates this parameter-efficient setting with mitigating catastrophic forgetting and preserving LLM reasoning capabilities.
4 Experiments
Experiments evaluate H2Table on complex hierarchical TableQA benchmarks using multiple base models and structural representations. H2Table consistently achieves the strongest results, especially as table nesting depth increases, while ablations and cross-domain tests examine its components and robustness.
- Experimental setup: Experiments evaluate H2Table on HiTab and TATQA, using TableQA Accuracy and categorizing results by table nesting depth.TATQA tables with four-level headers were excluded because only 12 such tables were available.
- Main results: H2Table consistently outperforms baseline representations across base models and table nesting depths.The comparisons include pure-text representations and TAMO, with experiments using Llama2-7B, Llama3.1-8B, and Gemma2-9B.
- Main results: 0.7596 average accuracy is achieved by Gemma2-9B with H2Table on HiTab, exceeding pure-text and TAMO representations.H2Table yields the highest average accuracy within each evaluated base-model group.
- Main results: 0.7143 accuracy is achieved by Llama3.1-8B with H2Table on HiTab Depth-4 tables, versus 0.5714 for pure text and 0.6286 for TAMO.H2Table remains robust on Depth-3 and Depth-4 tables while traditional baselines decline as structural complexity increases.
- Main results: 0.7596 for Gemma2-9B with H2Table exceeds 0.6659 for DeepseekV3 and 0.7011 for GPT-4o on HiTab while updating approximately 1% of parameters.The comparison concerns complex table reasoning with medium-sized models fine-tuned using H2Table.
- Ablation study: Removing textual features or the hierarchical hypergraph encoder causes severe degradation, while removing GAT message passing or query alignment causes smaller but consistent declines.The full architecture performs best on average; the w/o GAT variant is competitive on flat Depth-1 tables but loses more on deeper tables.
- OOD generalization: H2Table achieves the best performance across all reported cross-domain settings, outperforming TAMO on in-domain and cross-domain test sets.When trained on HiTab, pure text reaches 0.8330 on AITQA and TAMO reaches 0.8634 before H2Table’s stronger results.
- Query-vector analysis: 12 query vectors provide robust cross-model performance and are selected for all experiments.This count performs best on Llama3.1-8B and remains near-optimal on Llama2-7B and Gemma2-9B.
5 Conclusion
H2Table combines hierarchical nested hypergraphs, hierarchy-aware encoding, and learnable query vectors to support LLM table reasoning. Across multiple datasets, it demonstrates strong performance and generalization, particularly for intricate hierarchical tables.
- 5 Conclusion: H2Table represents complex tables as hierarchical nested hypergraphs and uses a four-stage hierarchy-aware encoder with learnable query vectors.The query mechanism extracts representative structural features that are supplied to the LLM for table reasoning.
Limitations
The study assumes that accurate header hierarchies are available in advance and still feeds serialized tabular text into the LLM. Future work targets end-to-end structure extraction and richer structural embeddings.
- Limitations: H2Table assumes that complex-table header structures can be accurately obtained beforehand.The authors use these hierarchies as available structural annotations to isolate the contribution of hierarchical hypergraph modeling.
- Limitations: The framework still relies on serialized tabular text, motivating future work on structural embeddings that capture richer semantic information.The stated future direction is to integrate upstream table-structure extractors and improve semantic capture in the encoder outputs.
A.1 Training Settings.
Training uses LoRA with specified optimization settings and concatenates graph/query embeddings with text prompts and target labels. Input descriptions are truncated and generated targets are length-bounded.
- A.1 Training Settings.: LoRA uses rank 8, α = 16, dropout = 0.05, AdamW optimization, and a learning rate of 1 × 10^-5.AdamW uses β1 = 0.9, β2 = 0.95, and weight decay = 0.05.
- A.1 Training Settings.: Training sequences concatenate graph/query embeddings with the description, question, and target label.Descriptions are truncated to 1,024 tokens and target generation is bounded to 128 tokens.
A.2 Datasets.
The evaluation datasets include hierarchical and converted table formats, with TATQA requiring LLM-based transformation from flat matrices. Manual inspection found a 9% structural conversion error rate, and conversion quality was associated with downstream TableQA accuracy.
- AITQA annotations were converted into the HiTab format with row-header and column-header trees plus a data matrix.
- TATQA flat matrix tables were transformed into hierarchical structures using an LLM, introducing potential conversion errors.
- 91 of 100 manually reviewed TATQA tables were converted accurately, while 9 contained noticeable structural errors.
- The evaluation table covers the full TATQA test set, comprising 1,669 question-answer pairs.
- 52.20% accuracy on correctly converted tables exceeded the 37.04% accuracy on structurally erroneous tables by 15.16%.The full TATQA test-set accuracy was 52.07%, close to the correctly converted subset.
A.3 Evaluation.
Evaluation uses unified relaxed answer normalization across methods, while additional analyses examine flat-table behavior and complex-table reasoning. H2Table successfully answers the illustrated depth-4 case where TAMO fails.
- Evaluation protocol: All compared methods use identical answer cleaning and format normalization under a unified relaxed-match accuracy protocol.The normalization includes operations such as stripping currency symbols.
- Complex-table case study: In the Figure 5 case study, H2Table answers the complex hierarchical-table question correctly while TAMO fails.The passage attributes this result to H2Table’s hierarchical modeling and message-passing mechanism.
- Flat-table behavior: In flat tables, hierarchical relations collapse and message passing reduces to leaf-level V2E and E2V interactions.
- Flat-table behavior: H2Table remains applicable to flat tables and transfers structural knowledge through learnable-query cross-attention rather than average pooling.
C.2 Statistical Significance Analysis on Deep Hierarchy Tables
The deep-hierarchy analysis aggregates Depth-3 and Depth-4 tables for a larger sample and tests H2Table against TAMO. McNemar tests indicate statistically significant performance gains.
- The unified Deep Hierarchy subset contains 848 tables, combining Depth-3 tables (N = 813) and Depth-4 tables (N = 35).Evaluation uses the Llama-3.1-8B backbone and compares H2Table with TAMO.
- H2Table demonstrates a stable improvement over TAMO on the combined Deep Hierarchy subset.
- McNemar’s test reports an exact p-value of 0.0079 and a continuity-corrected χ2 p-value of 0.0083, both below 0.01.The analysis compares exact-match predictions from H2Table and TAMO.