Robust (Controlled) Table-to-Text Generation with Structure-Aware Equivariance Learning

Fei Wang, Zhewei Xu, Pedro A. Szekely, Muhao Chen

Introduction

Generating natural language descriptions from tabular data is a cornerstone of data-to-text tasks. However, modern Large Language Models (LLMs) like T5 typically process tables by "linearizing" them—converting a 2D grid into a 1D sequence of tokens. This approach, while convenient for standard Transformer architectures, fundamentally ignores the geometric properties of tables. When a table's layout is altered (e.g., rows are shuffled or columns are transposed), the resulting linearized string changes drastically, even though the underlying information remains identical. This leads to "brittle" models that are prone to hallucinations and inconsistent outputs when the input format deviates from training patterns.

The LATTICE Framework

To address these limitations, the authors introduce LATTICE (Layout Aware and TransformaTion Invariant Controlled Table-to-Text GEneration). LATTICE is designed to enforce structural awareness and transformation invariance directly within the model's architecture. Crucially, it is a "plug-and-play" framework that does not add any new parameters to the base model, ensuring computational efficiency.

Structure-Aware Self-Attention

In a standard Transformer, every token can attend to every other token in a complete graph. LATTICE replaces this global attention with a pruned mechanism. A token within a specific cell is restricted to attending only to tokens within the same cell, the same row, or the same column. This mimics human cognitive patterns when reading tables, focusing on horizontal and vertical relationships to derive context rather than treating the table as a continuous sentence.

Transformation-Invariant Positional Encoding

Standard positional encodings rely on the sequential order of tokens in the linearized string (1, 2, 3...). LATTICE modifies this by maintaining relative order within a cell but treating the distance between tokens in different cells as a constant "maximum distance." This ensures that the model's internal representation of a cell's content is independent of its specific index in the input sequence, making the model invariant to row shuffling or column transpositions.

Experimental Setup and Datasets

The framework was evaluated using three primary benchmarks:

  1. ToTTo: A large-scale Wikipedia-based dataset for controlled table-to-text generation where specific cells are highlighted for description.
  2. HiTab: A dataset featuring complex tables with hierarchical, nested headers.
  3. "Hard" ToTTo: A custom-built stress test where the ToTTo development set was perturbed via random row shuffling and table transposition to test model robustness.

Key Results and Insights

The experimental results demonstrate that structural awareness is superior to simple data augmentation (showing the model shuffled tables during training).

  • State-of-the-Art Performance: LATTICE (based on T5-base) achieved a BLEU score of 48.4 on the standard ToTTo test set, surpassing the vanilla T5-base score of 47.4.
  • Unmatched Robustness: The most striking result appeared in the "Hard" ToTTo evaluation. While the standard T5 model experienced a significant performance degradation of 4.5 BLEU points when faced with shuffled or transposed data, LATTICE maintained a 0.0 drop in performance. This confirms that the model successfully learned the underlying tabular logic rather than memorizing sequence patterns.
  • Generalization: LATTICE showed improved performance on "non-overlap" subsets—tables that differ significantly from those seen during training—suggesting that structural constraints help the model generalize more effectively.

Conclusion and Future Work

LATTICE demonstrates that building "equivariance"—the property where a system's response changes predictably with input transformations—into the architecture is more effective than relying on data augmentation alone. By forcing the model to respect the geometry of the table, LATTICE eliminates the brittleness associated with linearization.

While the current implementation focuses on fine-tuning, future research could integrate these structure-aware constraints into the initial large-scale pre-training phase of LLMs. Additionally, extending LATTICE to handle extremely large tables (beyond the standard 512-token limit) and more complex mathematical reasoning tasks remains a promising area for development.

Summary updated

BibTeX
@inproceedings{wang2022robust,
  author = {Fei Wang and Zhewei Xu and Pedro A. Szekely and Muhao Chen},
  title = {{Robust (Controlled) Table-to-Text Generation with Structure-Aware Equivariance Learning}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.naacl-main.371},
}
Figure