Abstract
This work presents MATE, a sparse-attention Transformer architecture designed for modeling documents containing large tables. While tables are ubiquitous on the web, their size often exceeds the 512-token limit of standard Transformer models due to the quadratic complexity of self-attention. MATE introduces a novel multi-view attention mechanism that allows specific heads to attend efficiently to either rows or columns. This architecture scales linearly with respect to speed and memory, enabling the processing of documents exceeding 8,000 tokens. MATE sets a new state-of-the-art on three table reasoning datasets, most notably improving the HybridQA benchmark by 19 points over previous best results.
The Bottleneck of Quadratic Complexity
Standard Transformer architectures, such as BERT, rely on a self-attention mechanism with $O(n^2)$ complexity. This means computational costs quadruple as input length doubles, effectively capping sequence lengths at 512 tokens for most practical applications.
In the context of web data, this limitation is severe. Over 20% of relational tables on the web contain 20 or more rows. When these tables are paired with associated text—such as Wikipedia passages—the resulting documents easily exceed the 512-token threshold. While existing "efficient" Transformers like BigBird or Longformer use generic sparsity patterns (e.g., local sliding windows), these patterns fail to capture the logical structure of a table. In a table, a cell's meaning is derived from its relationship to row and column headers, not necessarily the tokens physically adjacent to it in a flattened string.
MATE: Multi-view Attention
MATE addresses these challenges by replacing dense self-attention with a structured sparse version tailored for tabular data. The core innovation is Multi-view Attention, which categorizes attention heads into three distinct roles:
- Row Heads: Tokens attend only to other tokens within the same row.
- Column Heads: Tokens attend only to other tokens within the same column.
- Global Query: All tokens can attend to the user's question (the query), and the query can attend to all tokens.
By reordering input tokens based on their row or column indices and applying windowed attention, MATE achieves linear complexity ($O(n)$). This allows the model to scale to 8,000+ tokens on current hardware without hitting the memory wall typical of standard Transformers.
Inductive Bias and Universal Approximation
The design of MATE is rooted in the observation that standard, dense Transformers naturally learn to attend to row and column structures over time. MATE enforces this behavior as an inductive bias, making the model easier to train and more accurate for tabular tasks. Despite this sparsity, the authors provide mathematical proof that MATE remains a "universal approximator," meaning the restricted attention pattern does not limit the model's theoretical capacity to represent complex functions.
Experimental Results
The researchers evaluated MATE across four major benchmarks: HybridQA (multi-hop reasoning over tables and text), SQA (sequential question answering), WikiTQ (complex data aggregation), and TabFact (statement verification).
Performance and Scaling
MATE established new state-of-the-art records on SQA, TabFact, and HybridQA. On the HybridQA benchmark, MATE achieved a massive 19-point leap in Exact Match (EM) performance, rising from approximately 44% to 63%.
Beyond accuracy, MATE offers significant efficiency gains. At a sequence length of 2,048 tokens, MATE is nearly 2x faster than the standard TAPAS model. As shown in the scaling analysis, MATE's prediction time grows linearly, whereas competing models experience much sharper increases in latency as sequence length grows.
Conclusion
MATE demonstrates that specialized sparsity patterns, when aligned with the logical structure of the data, can provide both efficiency and accuracy. By baking the structure of rows and columns into the attention mechanism, MATE overcomes the token limits that have long hindered large-scale table reasoning. Future work may extend this multi-view approach to other structured formats, such as HTML trees or knowledge graphs.
Summary updated