TL;DR
This paper introduces Table-r1, a novel two-stage approach that significantly boosts the table reasoning capabilities of small language models (SLMs). By combining self-supervised learning for better table layout understanding and a mixed-paradigm reinforcement learning strategy, Table-r1 enables SLMs to achieve performance competitive with much larger language models (LLMs) on complex table reasoning tasks.
What Problem Does This Paper Address?
Table reasoning (TR) is crucial for extracting information from semi-structured tables, but it's a tough challenge for smaller language models (SLMs) due to their limited capacity compared to large language models (LLMs). While program-based TR (P-TR), which generates executable code, shows promise, SLMs struggle with two main issues: handling diverse table layouts (like complex headers) and maintaining consistent reasoning. This paper aims to bridge this performance gap, enabling SLMs to perform table reasoning as effectively as LLMs.
Methods
Table-r1 employs a two-stage training strategy:
- Stage 1: Layout Transformation Inference (LTI): This is a novel self-supervised learning task. The model learns to understand table layouts by comparing an original table with a transformed version and generating a program that reconstructs the transformed table from the original. This helps SLMs better interpret headers and reference table content accurately, even with varied layouts.
- Stage 2: Mix-Paradigm Group Relative Policy Optimization (GRPO): This stage enhances reasoning consistency. It uses a modified GRPO algorithm that prioritizes P-TR but can dynamically switch to text-based TR (T-TR) when beneficial. This mixed approach allows the model to leverage the strengths of both paradigms, improving robustness and adaptability.
Datasets
The paper evaluates Table-r1 on four widely used table reasoning benchmarks:
- WTQ (What's That Question): A general-domain dataset with flat tables.
- TabFact: A dataset focused on fact verification from tables.
- HiTab: A dataset featuring hierarchical table headers, posing a greater challenge for layout understanding.
- AIT-QA: Another dataset with hierarchical tables, often related to specific domains like crime and health.
Key Insights and Ideas
- P-TR is Key for SLMs: The research strongly suggests that program-based table reasoning is a more effective paradigm for SLMs than text-based TR, especially for numerical and complex reasoning tasks.
- Layout Matters: Accurately understanding diverse table layouts is a significant bottleneck for SLMs in P-TR. The proposed LTI task directly addresses this by teaching models to interpret structural transformations programmatically.
- Flexibility is Crucial: A mixed-paradigm approach (P-TR with T-TR fallback) proves more effective than a strict P-TR approach, allowing the model to adapt to different question types and table structures.
- Reinforcement Learning Pays Off: GRPO, especially when combined with a cold-start strategy, significantly boosts SLM performance in table reasoning, demonstrating the power of RL for enhancing complex reasoning skills.
Key Results
Table-r1 achieves impressive results:
- It consistently outperforms all prior SLM-based methods across the four evaluated benchmarks.
- The method achieves at least a 15% accuracy improvement over the base SLM (LLaMA-8B).
- Table-r1 reaches performance levels competitive with top-tier LLMs, significantly narrowing the gap between SLMs and LLMs in table reasoning. For instance, on WTQ, Table-r1 (using Qwen2.5-Coder-7B) achieved 76.5% accuracy, comparable to LLMs like GPT-40 (63.2% for T-TR, 74.3% for P-TR).
Limitations and Future Work
- Generalization to Other Table Types: The current evaluation focuses on specific types of semi-structured tables. The authors acknowledge that generalization to other formats, such as multimodal tables, is not yet demonstrated.
- Applicability to Smaller SLMs: While the study uses 7B/8B SLMs, its direct applicability to even smaller models (e.g., 3B) is not guaranteed.
- Reward Weighting: The reward functions used in RL still require empirical tuning, which is a common challenge in RL.
- Future Work: The authors suggest exploring broader RL strategies to further advance table reasoning capabilities. They also hint at investigating how to better handle the complexity of hierarchical tables and the potential for even more sophisticated mix-paradigm strategies.
Summary updated