CLSep 29, 2024

2D-TPE: Two-Dimensional Positional Encoding Enhances Table Understanding for Large Language Models

arXiv:2409.19700v34 citationsh-index: 19
Originality Incremental advance
AI Analysis

This work addresses the problem of information loss when processing tabular data with LLMs, which is crucial for researchers and practitioners working on table understanding tasks.

The paper demonstrates that flattening 2D table structures into 1D inputs for LLMs negatively impacts their ability to capture spatial information. To address this, they introduce 2D-TPE, a positional encoding method that allows attention heads to dynamically select token permutation orders, improving table understanding across five benchmarks and showing better scalability for large tables.

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 attention head to dynamically select a permutation order of tokens within the context for attending to them, where each permutation represents a distinct traversal mode for the table, such as column-wise or row-wise traversal. 2D-TPE effectively mitigates the risk of losing essential spatial information while preserving computational efficiency, thus better preserving the table structure. Extensive experiments across five benchmarks demonstrate that 2D-TPE outperforms strong baselines, underscoring the importance of preserving the table structure for accurate table comprehension. Comprehensive analysis further reveals the substantially better scalability of 2D-TPE to large tables than baselines.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes