Abstract: This work presents a sparse-attention Transformer architecture for modeling documents that contain large tables. Tables are ubiquitous on the web, and are rich in information. However, more than 20% of relational tables on the web have 20 or more rows, and these large tables present a challenge for current Transformer models, which are typically limited to 512 tokens. Here we propose MATE, a novel Transformer architecture designed to model the structure of web tables. MATE uses sparse attention in a way that allows heads to efficiently attend to either rows or columns in a table. This architecture scales linearly with respect to speed and memory, and can handle documents containing more than 8000 tokens with current accelerators. MATE also has a more appropriate inductive bias for tabular data, and sets a new state-of-the-art for three table reasoning datasets. For HybridQA, a dataset that involves large documents containing tables, we improve the best prior result by 19 points.
Introduction: The Quadratic Achilles' Heel
While Transformers have revolutionized natural language processing, they suffer from a significant computational bottleneck: the cost of self-attention grows with the square of the sequence length ($O(n^2)$). This quadratic complexity makes them notoriously inefficient for long documents.
In the context of tabular data, this is a major hurdle. Over 20% of relational tables on the web contain 20 or more rows. When these tables are combined with associated metadata and linked text (such as Wikipedia paragraphs), the token count frequently exceeds the standard 512-token limit of models like BERT or TAPAS. Previous "efficient" Transformer variants were often designed for general text and ignored the inherent grid-like structure of tables, leading to sub-optimal performance on semi-structured data.
The MATE Architecture: Multi-view Attention
The core innovation of MATE is Multi-view Attention. Rather than allowing every token to attend to every other token, MATE specializes its attention heads into distinct "views" that respect the table's structure:
- Row Heads: Tokens only attend to other tokens within the same row.
- Column Heads: Tokens only attend to other tokens within the same column.
- Global Context: Query tokens (the question) and special tokens like
[CLS]act as a global memory, maintaining full visibility across the entire input.
To implement this efficiently, MATE reorders input tokens by row or column index before applying a windowed attention mechanism. This reordering allows the model to achieve linear scaling ($O(n)$) in both speed and memory usage. Furthermore, because MATE adds no new parameters, it remains fully compatible with existing pre-trained weights from models like BERT or TAPAS.
The POINTR Framework
To handle complex Question Answering (QA) tasks, the authors introduce POINTR, a two-stage inference pipeline:
- Cell Selection: MATE processes the entire table and linked entity descriptions to identify the specific cell containing the answer.
- Reader: A standard reading comprehension model then extracts the final answer span from the selected cell and its associated text.
Experimental Results and Efficiency
MATE was evaluated on four major benchmarks: HYBRIDQA, SQA (Sequential Question Answering), WIKITQ, and TABFACT.
One of the most striking results was on HYBRIDQA, where MATE improved the state-of-the-art by 19 points (reaching 63.4 EM / 71.0 F1). This leap is largely attributed to MATE's ability to process the full table and all associated passages jointly, rather than relying on aggressive and potentially lossy pruning.
Empirically, MATE demonstrates superior efficiency. At a sequence length of 2048 tokens, MATE is nearly twice as fast as the standard TAPAS model. As shown in the performance scaling analysis, MATE maintains a manageable prediction time even as sequence lengths approach 4096 tokens, whereas standard models become prohibitively slow or run out of memory.
Conclusion and Future Work
MATE demonstrates that structural inductive bias—forcing the model to respect rows and columns—is not just an optimization but a superior prior for tabular reasoning. While MATE sets new benchmarks, challenges remain in handling numerical reasoning (e.g., "1" vs "one") and multi-hop complexity beyond two steps. Future research will likely focus on integrating robust numerical modules and refining entity-linking within the POINTR pipeline.
Summary updated