TL;DR
Thinking with Tables (TWT) is a novel program-aided, neuro-symbolic framework designed to supercharge Multimodal Large Language Models (MLLMs) on complex tabular-vision tasks. By allowing models to interactively write and execute Python code within a sandboxed environment, TWT successfully overcomes data incompleteness and complex feature dependencies, outperforming standard open-source baselines by an average of 10% in accuracy.
What Problem Does This Paper Address?
While MLLMs have made massive strides in understanding text and natural images, Tabular-Vision Multi-Modal Understanding (TVMU) remains a notoriously difficult frontier. In the real world, tables aren't always clean CSV files; they are often embedded inside scanned PDFs, financial reports, or screenshots.
The authors identify three core challenges that cripple traditional MLLMs in these scenarios:
- Structural Variability and Incompleteness: Tables come in varied formats (e.g., three-line tables, merged cells) and visual inputs can suffer from low resolution or occlusion, leading to missing data.
- Implicit Feature Dependencies: Models struggle to implicitly calculate how different columns and rows interrelate to predict a target value.
- Task Heterogeneity: The pipeline required to answer a financial question (Table QA) is fundamentally different from the pipeline needed to predict a trend (Table Prediction).
Purely visual or text-based prompting strategies fall short because they force the neural network to perform complex data manipulation and statistical modeling entirely within its weights.
Methods
To bridge this gap, TWT introduces a program-aided, neuro-symbolic approach that treats table reasoning as an interactive coding process.
1. The Interaction Protocol & Sandbox
TWT enforces a strict, multi-turn interaction protocol using specialized tags:
<analy>: The model plans its next step or interprets data.<code>: The model writes Python code to manipulate the table.- <code_results>: An external, secure Python REPL sandbox executes the code and returns outputs or error messages.
<answer>: The model outputs its final response once reasoning is complete.
2. Two-Stage Training Strategy
- Stage 1: Task-Oriented Supervised Fine-Tuning (TO-SFT): The authors built a verifiable data synthesis pipeline using stronger models (Qwen3-VL-Plus/Max) to generate high-quality problem-solving trajectories. During training, the sandbox execution results are masked so the model learns to generate correct code rather than just memorizing outputs.
- Stage 2: Adaptive Loss-Scaled Reinforcement Learning (AL-GRPO): Using Group Relative Policy Optimization, the model is rewarded based on final answer correctness. To ensure the model learns to generate stable, executable code without complex code-level reward hacking, they introduce an adaptive loss-scaled strategy: only code segments that execute successfully without errors contribute to the gradient updates.
Datasets
The framework was evaluated across eight representative datasets split into two core tracks:
- Multimodal Table QA: WikiTQ (general knowledge), TabMWP (math word problems), FinQA (financial), and TAT-QA (hybrid text-table financial data).
- Multimodal Table Prediction: Adoption and SkinCA (classification tasks); Pawpularity and Paintings (regression tasks).
Crucially, during evaluation, models were only given table headers visually; they had to programmatically query the full dataset from the sandbox to succeed.
Key Insights and Ideas
- Delegating to the Right Tool: Neural networks are notoriously bad at precise arithmetic and training traditional ML models (like Random Forests) on the fly. TWT shifts this burden to the symbolic side (Python libraries like
pandasandscikit-learn), leaving the MLLM to handle semantic understanding and high-level planning. - The Failure of Pure Vision: Preliminary experiments showed that when full table text is omitted and models rely purely on visual table inputs, performance plummets—especially on complex layouts like three-line tables.
- Gradient Masking for Broken Code: Instead of penalizing bad code with negative rewards (which destabilizes RL training due to reward sparsity), TWT simply ignores failed code blocks during gradient updates, allowing the model to naturally gravitate toward stable code generation.
Key Results
TWT achieved an extraordinary average rank of 1.25 across all eight benchmarks, consistently outperforming general open-source MLLMs and specialized tabular models.
- Beating Proprietary SOTA: TWT (built on Qwen3-VL-8B) achieved a 72.82% accuracy on TAT-QA and 78.95% on WikiTQ, matching or even outperforming commercial heavyweights like GPT-5.1 and Qwen3-VL-Plus.
- Massive Regression Gains: On the Pawpularity regression task, TWT achieved a normalized Root Mean Squared Error (nRMSE) of 0.199, compared to the base Qwen3-VL-8B model's 0.501. This massive leap is due to TWT's ability to spin up a Random Forest regressor inside the sandbox to handle complex feature dependencies.
Limitations and Future Work
While highly effective, the authors noted a slight drop in code execution accuracy on the highly complex TAT-QA dataset during the RL stage, even though final answer accuracy improved. This suggests that the interplay between dynamic loss scaling and complex text-table reasoning still has room for optimization. Additionally, the framework currently relies on pre-integrated external tools (like a specific pretrained ResNet50 for image features); expanding TWT to support open-ended tool discovery is a promising future direction.
Summary updated