TL;DR
This paper introduces STable, a novel framework for encoder-decoder models that generates database-like tables from text. By employing a permutation-based training approach and a flexible decoding strategy, STable achieves state-of-the-art results on various table generation tasks, outperforming previous methods by up to 15%.
What Problem Does This Paper Address?
Many NLP tasks, such as extracting information from invoices, populating knowledge bases, or identifying entities and relations, can be naturally represented as structured tables. While existing encoder-decoder models have been adapted for structured output generation, they often rely on sequential, autoregressive decoding that can lead to error propagation and fail to capture the inherent two-dimensional structure of tables. This paper addresses the challenge of generating tables with formal validity and high accuracy by proposing a framework that treats table generation as a text-to-table task, allowing for flexible and context-aware cell generation.
Methods
STable's core innovation lies in its permutation-based decoder training and model-guided cell ordering during inference.
- Permutation-Based Training: Instead of a fixed left-to-right, row-by-row generation order, STable trains by maximizing the expected log-likelihood of table content across all possible random permutations of cell factorization orders. This allows the model to learn dependencies between cells regardless of their position.
- Model-Guided Cell Ordering: During inference, STable doesn't rely on a predefined order. It uses a greedy approach to select the next cell to generate based on the model's confidence, aiming to minimize uncertainty at each step. This is achieved through an outer loop that iteratively selects cells and an inner loop that generates cell content.
- Tabular Attention Bias: To better incorporate the table structure into the attention mechanism, STable introduces tabular attention biases that consider the relative positions of cells within the table, in addition to the standard relative positional biases.
- Grammar-Constrained Decoding: The framework implicitly enforces structural correctness, preventing the generation of malformed tables.
Datasets
The paper evaluates STable on several public and private datasets:
- Public Datasets:
- PWC* (for information extraction from machine learning papers)
- CORD (for receipt line item extraction)
- Rotowire (for generating team and player statistics from sports news)
- DWIE (for joint entity and relation extraction from news articles)
- Confidential Datasets:
- Payment Stubs (for extracting payment details)
- Recipe Composition (for ingredient properties from food manufacturer documentation)
- Bank Statements (for account balances)
The authors also mention using Natural Questions and WebTables for pretraining/adaptation.
Key Insights and Ideas
- Table Generation as Text-to-Table: Reinterpreting diverse NLP tasks as text-to-table generation provides a unifying paradigm that leads to significant improvements.
- Order Matters (and Can Be Learned): Forcing a rigid decoding order (like row-by-row) is suboptimal. Allowing the model to learn the optimal generation order dynamically, guided by its confidence, is crucial for accuracy.
- Error Propagation is Real: Just like in machine translation, sequential decoding in table generation can lead to cascading errors. STable's flexible ordering helps mitigate this.
- Implicit Structure is Powerful: The model learns to understand table semantics and structure without explicit rule-based constraints, demonstrating the power of its permutation-based training.
Key Results
STable achieves state-of-the-art results on several challenging datasets, including:
- PWC*: A 14.9% relative improvement (26.8 to 30.8).
- Bank Statements: An over 14.4% relative improvement (61.1 to 69.9).
- CORD: Outperforming linearized models by 3.2% (92.4 to 95.6).
- Rotowire Team: Outperforming linearized models by 0.2% (84.5 to 84.7), with STable achieving 86.8%.
The framework also demonstrates significant speedups during inference, reducing processing time by up to five times for some datasets due to parallelized cell decoding.
Limitations and Future Work
- Inference Time: The full table context can negatively influence the computational cost of attention during inference, especially for large tables.
- Decoding Order Explainability: While the model learns an effective decoding order, a formal explanation of this order remains an open research question.
Future work could explore limiting the table context to only the relevant row and column for a given cell to reduce memory consumption. Additionally, developing new explainability methods to understand the learned decoding order is suggested. The authors also note that adapting STable for tasks like Table Structure Recognition (where headers are not known upfront) is straightforward and a promising direction.
Summary updated