Tab-PET: Graph-Based Positional Encodings for Tabular Transformers
Yunze Leng, Rohan Ghosh, Mehul Motani
TL;DR
This paper tackles the lack of intrinsic structure in tabular data by introducing Tab-PET, a graph-based framework that generates fixed, Laplacian-eigenvector positional encodings derived from feature graphs estimated via association- or causality-based methods. By concatenating these encodings with standard embeddings, Tab-PET provides a structured inductive bias that reduces the effective rank of transformer embeddings, improving generalization across 50 tabular datasets and multiple transformer backbones. The authors establish theoretical results linking PEs to rank reduction and demonstrate substantial empirical gains, with association-based graph estimates (especially Spearman-based) outperforming causality-based ones and fixed PEs outperforming learnable PEs in low-data regimes. Overall, Tab-PET reveals a practical mechanism to harness data structure in tabular transformers, improving accuracy and robustness while maintaining parameter efficiency.
Abstract
Supervised learning with tabular data presents unique challenges, including low data sizes, the absence of structural cues, and heterogeneous features spanning both categorical and continuous domains. Unlike vision and language tasks, where models can exploit inductive biases in the data, tabular data lacks inherent positional structure, hindering the effectiveness of self-attention mechanisms. While recent transformer-based models like TabTransformer, SAINT, and FT-Transformer (which we refer to as 3T) have shown promise on tabular data, they typically operate without leveraging structural cues such as positional encodings (PEs), as no prior structural information is usually available. In this work, we find both theoretically and empirically that structural cues, specifically PEs can be a useful tool to improve generalization performance for tabular transformers. We find that PEs impart the ability to reduce the effective rank (a form of intrinsic dimensionality) of the features, effectively simplifying the task by reducing the dimensionality of the problem, yielding improved generalization. To that end, we propose Tab-PET (PEs for Tabular Transformers), a graph-based framework for estimating and inculcating PEs into embeddings. Inspired by approaches that derive PEs from graph topology, we explore two paradigms for graph estimation: association-based and causality-based. We empirically demonstrate that graph-derived PEs significantly improve performance across 50 classification and regression datasets for 3T. Notably, association-based graphs consistently yield more stable and pronounced gains compared to causality-driven ones. Our work highlights an unexpected role of PEs in tabular transformers, revealing how they can be harnessed to improve generalization.
