Abstract
Large Language Models (LLMs) often struggle with tabular data due to the fundamental mismatch between the two-dimensional structure of tables and the one-dimensional nature of sequence processing. We present TableLoRA, a parameter-efficient fine-tuning (PEFT) method designed to bridge this gap. By introducing a specialized token encoder and "2D LoRA" embeddings for row and column indices, TableLoRA enables models to explicitly represent structural relationships. Our evaluation across four major benchmarks shows that TableLoRA significantly outperforms standard LoRA, mitigating over 40% of the performance gap between efficient tuning and full-parameter fine-tuning while training only 0.13% of parameters.
Introduction
While LLMs are increasingly deployed for tabular tasks such as question answering and fact verification, they face a "dimensionality problem." Tables are inherently 2D, but LLMs process text as a 1D sequence. Standard serialization methods (e.g., Markdown or HTML) often lose the explicit coordinate system of the table, making it difficult for models to associate headers with distant cell values. TableLoRA addresses two primary challenges: improving table serialization and integrating 2D structural information directly into the transformer architecture.
Methodology
TableLoRA introduces two primary architectural components that plug into existing LLM layers:
- Special Tokens Encoder: Instead of generic delimiters, TableLoRA uses three structural anchors:
[tab],[row], and[cell]. A dedicated encoder adds learnable prompts to these specific token embeddings, ensuring the model effectively learns the table's structural boundaries. - 2D LoRA: This core innovation adds low-rank embeddings representing row and column indices for every token within a table cell. This allows the model to "see" which cells share a row or column, regardless of their distance in the 1D string.
The mathematical integration is defined as: $$h = W_0x + BAx + B_{tab}(Emb_{row} + Emb_{col})$$ Where $BAx$ represents standard LoRA and $B_{tab}$ handles the structural row/column embeddings.
Experimental Setup
We evaluated TableLoRA using Llama 2, Llama 3, and DeepSeek models across four diverse datasets:
- HiTab: Complex tables with hierarchical, multi-layered headers.
- WikiTQ: Question answering on flat tables.
- FeTaQA: Free-form text generation based on table data.
- TabFact: Fact-verification tasks.
Key Results and Insights
TableLoRA consistently outperformed vanilla LoRA across all tested models and datasets. On the complex HiTab dataset using Llama 2, TableLoRA achieved 48.94% accuracy, a significant improvement over vanilla LoRA's 43.00%.
Structural Awareness and Efficiency
- Gap Mitigation: TableLoRA mitigates 40.56% of the performance gap between standard LoRA and full-parameter fine-tuning while remaining highly efficient, using only slightly more GPU memory (168G vs 160G for standard LoRA).
- Complex Query Handling: The model showed a 17.2% improvement on queries involving "Argmax/Argmin" functions, which require precise spatial reasoning across rows and columns.
- Architecture vs. Prompting: The authors found that architectural integration of row/column IDs is superior to "string injection" (manually adding coordinates to the prompt), which actually degraded performance.
Conclusion and Future Work
TableLoRA demonstrates that structural awareness is key to tabular understanding in LLMs. While it significantly narrows the gap to full-parameter fine-tuning, it does not yet close it. Current limitations include its inapplicability to "black-box" APIs (as it requires architectural modification) and continued struggles with complex numerical reasoning (e.g., Sum/Diff operations). Future research will focus on integrating numerical reasoning capabilities with this structural framework.
Summary updated