Manuscript Offprint

arXiv:2610.24798

Table Serialization Determines Which Relations Language Models Preserve

Junwei Ma, Arun Kumar Chithanar, Palash Goyal, Chul Lee

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We study how text serialization affects table lookup in instruction-tuned language models. Our diagnostic asks the model to find the row containing a specified value under one named column, then return the value under another named column in that same row. We render the same synthetic 256-cell tables in row-major form and in column-major form with each header placed beside its values, while varying the table aspect ratio across five shapes. Across three models, the better format changes with table shape: row-major performs better on tall tables, whereas column-major performs better on wide tables. At 64×464 \times 4, row-major leads by 42.3–54.0 percentage points; at 4×644 \times 64, column-major leads by 35.0–59.0 points. Mapping wrong answers back to their source cells reveals a complementary error pattern: row-major tends to preserve the correct row but lose the target column, while column-major tends to preserve the correct column but lose the row. We use the term relational locality to describe this pattern: serialization keeps one relation locally available while making the other depend on positional alignment. A separate non-tabular ordering experiment supports this interpretation. Thus, apparent width-related failures in text-serialized tables depend on linearization, not table shape alone.

1 Introduction

Tables are a common way to organize information in spreadsheets, databases, reports, and software tools. General-purpose language models are increasingly asked to answer questions over such data [Sui et al., 2023, Liu et al., 2024b, Jiang et al., 2023]. When a table is included in a text prompt, however, it must be written as a sequence—usually row by row or column by column. These renderings can contain exactly the same cells while placing different labels and values next to one another.

Under the common row-major format, accuracy on some table tasks falls as more columns are added. This observation alone does not show that wide tables are inherently difficult: adding columns also lengthens every serialized row and increases the distance between the header and its values. Table shape and serialization are therefore confounded. A controlled comparison must hold the table itself fixed while changing how it is written.

We make this comparison using a simple lookup task. The model is told that a particular value appears in one named column and must return the value from a different named column in the same row. We render the same synthetic 256-cell tables in row-major and locally headed column-major form, vary their aspect ratio across five shapes, and evaluate three instruction-tuned language models. Because the cell contents, question, and answer are unchanged within each pair, differences in accuracy can be attributed to the representation.

*Corresponding author: junweima2@gmail.com

40th Conference on Neural Information Processing Systems (NeurIPS 2026). Workshop: Linguistic Principles for Foundation Models.

The better representation changes with table shape. Row-major text performs better on tall tables, whereas column-major text performs better on wide tables. The errors also reverse: row-major predictions more often retain the correct row but miss the requested column, while column-major predictions more often retain the correct column but miss the row. We call this pattern relational locality: a serialization makes some relations easier to recover by keeping their relevant values and labels together. This motivates a simple hypothesis: language models recover a relation more reliably when the serialization keeps those elements together. We test it through a paired row-versus-column lookup experiment and a separate non-tabular ordering experiment. Our main conclusion is that apparent width-related failures in text-serialized tables depend on linearization as well as table shape.

References (27)