TL;DR
When you feed a 2D spreadsheet into a 1D language model, it doesn't just guess cell values using fuzzy word associations—it builds an internal GPS. By dissecting how LLMs look up single cells, researchers discovered a clean three-stage assembly line: matching headers, literally counting pipe delimiters (|) and newlines to calculate (row, column) coordinates, and copying the result to the output. Best of all, this internal coordinate grid is linear, meaning you can shift the model's gaze left or right across columns using simple vector math.
What Problem Does This Paper Address?
Transformers live in Flatland: they process text strictly as one-dimensional sequences of tokens. Yet we routinely flatten two-dimensional tables into Markdown or HTML strings and expect LLMs to reason over rows and columns.
While plenty of engineering tricks improve tabular performance, how a sequential model reconstructs 2D spatial logic under the hood has remained a black box. Previous mechanistic interpretability work focused on natural language tasks like factual recall, leaving open a fundamental question: how does an LLM navigate rigid spatial coordinates when all it sees is a single line of text?
Methods
To isolate structural reasoning from memorized facts, the authors zoom in on the atomic task of cell location (given a row header and column header, output the intersecting cell). They inspect four open-weights model families (Qwen, Llama, Mistral, and Gemma, from 0.6B to 32B parameters), focusing primarily on Qwen3-4B.
They combine standard interpretability tools with clever table-specific diagnostics:
- Activation Patching & Zero Ablation: Swapping internal states between "clean" and "corrupted" queries (where the target row or column is changed) or zeroing out specific attention heads to prove causal necessity.
- Linear Probing: Training simple linear regressors on hidden states to see when and where row and column numbers become readable.
- Virtual-RoPE Coordinate Diagnostic (Novel): Models use Rotary Positional Embeddings (RoPE) to track sequence positions. The authors test attention heads counterfactually by feeding logical column indices (e.g., Column 3) into RoPE instead of raw token positions to spot "coordinate-encoding heads."
- Activation Steering: Extracting a "unit shift vector" between adjacent columns and adding multiples of it to hidden states to shift which column the model reads.
Datasets
- Synthetic Cell-Location Benchmark (New): 500 Markdown tables serialized with pipes (
|) and newlines. Cell values are randomly sampled from an entity pool so models cannot cheat using pre-trained world knowledge. - HiTab: An existing real-world dataset of complex, hierarchical tables featuring nested/merged headers and aggregation tasks, used to verify that findings generalize beyond toy setups.
Key Insights and Ideas
- A Three-Stage Pipeline: Table lookup happens in distinct layer bands. Early layers (1–16) handle Semantic Binding, matching your question's text to the right headers. Middle layers (17–23) handle Coordinate Localization, abstracting away from words to find the geometric intersection. Late layers (24+) execute Information Propagation, where "mover heads" copy the located cell's value to the final token for decoding.
- Delimiters Are Clock Signals: How does the model know what column a cell is in? It counts punctuation. Linear probes reveal that coordinate indices appear first on pipe (
|) and newline (\n) delimiters in early layers before propagating to actual cell text after Layer 15. Column predictions form a clean sawtooth wave (counting up across pipes, resetting at newlines), while row predictions form a staircase.
- Columns Live in a Linear Subspace: Column indices are represented as equidistant steps along a straight line in activation space. If you take the vector that shifts focus by +1 column, multiplying it by 3 shifts focus by +3 columns, and adding a
+1vector to a+3vector cleanly mimics a+4shift.
Key Results
- Row Binding Is Causal and Fragile: Zero-ablating the top 20 row-alignment heads crashes synthetic accuracy from 94.4% to 5.2%. On real-world HiTab tables, ablating these heads causes 57.4% of outputs to collapse into empty answers.
- Precise Geometric Alignment: In middle layers, coordinate-encoding heads track logical column indices with a Pearson correlation of 0.997 on synthetic tables (and 0.988 on HiTab's complex matrix indices).
- Delimiters Drive Causal Control: Patching attention heads selected from delimiter probes yields massive causal recovery (0.958 Effect Score for columns, 0.527 for rows), whereas heads selected from cell-content probes do almost nothing (0.025 and 0.006).
- Additive Vector Steering: On column steering, a composite shift vector (
+1++3) achieves an Effect Score of 1.169, closely matching a directly extracted+4vector (1.079).
Limitations and Future Work
The main text notes a few natural boundaries to this internal coordinate system (while deferring broader discussion to appendices):
- Scale Degradation: Probe prediction errors grow as row and column counts get larger, showing that the delimiter-counting mechanism degrades as table dimensions expand.
- Local, Format-Dependent Steering: Linear column steering works locally—it weakens at large column offsets and table boundaries, and formats like HTML require format-specific vector extraction rather than a universal representation.
- Hierarchical Bottlenecks: In complex real-world tables (HiTab), translating nested/merged header hierarchies into clean matrix coordinates remains a major failure bottleneck, even when row binding succeeds.
Summary updated