2D-TPE: Two-Dimensional Positional Encoding Enhances Table Understanding for Large Language Models
Jia-Nan Li, Jian Guan, Wei Wu, Zhengtao Yu, Rui Yan

TL;DR
This paper introduces 2D-TPE, a novel positional encoding method for large language models that preserves 2D table structure, significantly improving their ability to understand and reason over tabular data.
Contribution
The paper proposes 2D-TPE, a simple and effective 2D positional encoding technique that enhances LLMs' capacity to process structured tables without losing spatial information.
Findings
2D-TPE outperforms baseline methods on five benchmarks.
Preserves spatial relationships in tables more effectively.
Scales better to large tables than existing approaches.
Abstract
Tables are ubiquitous across various domains for concisely representing structured information. Empowering large language models (LLMs) to reason over tabular data represents an actively explored direction. However, since typical LLMs only support one-dimensional~(1D) inputs, existing methods often flatten the two-dimensional~(2D) table structure into a sequence of tokens, which can severely disrupt the spatial relationships and result in an inevitable loss of vital contextual information. In this paper, we first empirically demonstrate the detrimental impact of such flattening operations on the performance of LLMs in capturing the spatial information of tables through two elaborate proxy tasks. Subsequently, we introduce a simple yet effective positional encoding method, termed ``2D-TPE'' (Two-Dimensional Table Positional Encoding), to address this challenge. 2D-TPE enables each…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Advanced Text Analysis Techniques · Topic Modeling
MethodsSoftmax · Attention Is All You Need
