Abstract
Tabular datasets are ubiquitous in data science applications. Given their importance, it seems natural to apply state-of-the-art deep learning algorithms in order to fully unlock their potential. Here we propose neural network models that represent tabular time series that can optionally leverage their hierarchical structure. This results in two architectures for tabular time series: one for learning representations that is analogous to BERT and can be pre-trained end-to-end and used in downstream tasks, and one that is akin to GPT and can be used for generation of realistic synthetic tabular sequences. We demonstrate our models on two datasets: a synthetic credit card transaction dataset, where the learned representations are used for fraud detection and synthetic data generation, and on a real pollution dataset, where the learned encodings are used to predict atmospheric pollutant concentrations.
Introduction
While deep learning has revolutionized fields like computer vision and natural language processing, its application to tabular data—particularly multivariate time series—remains an area of active research. Dynamic tabular data, such as chronological sequences of credit card transactions or environmental sensor readings, presents unique challenges due to complex temporal dependencies and the mix of categorical and continuous variables. Furthermore, privacy regulations often restrict the sharing of such sensitive data. This work addresses these challenges by introducing transformer-based architectures for unsupervised representation learning and high-fidelity synthetic data generation.
Methodology
The proposed approach adapts the "language modeling" metaphor to tabular data by quantizing continuous variables, thereby treating each row as a sentence and each field as a word.
TabBERT: Representation Learning
TabBERT utilizes a hierarchical transformer architecture to capture both intra-row and inter-row relationships. As shown in Figure 1, the model consists of two main components:
- Field Transformer: This module processes individual fields within a single row to capture intra-transaction relationships, producing a unified row embedding.
- Sequence Transformer: This module processes a chronological sequence of row embeddings to capture temporal dynamics.
The model is pre-trained using Masked Language Modeling (MLM), where 15% of the fields are randomly masked and the model learns to predict them.
TabGPT: Synthetic Generation
TabGPT is a generative model based on the GPT architecture designed to produce realistic synthetic tabular sequences. Unlike the hierarchical TabBERT, TabGPT flattens the structure, passing sequences of transactions (separated by a [SEP] token) into a causal decoder. It learns to predict future transactions based on past behavior, effectively mimicking a user's transaction history.
Experimental Setup
The models were evaluated on two primary datasets:
- Synthetic Credit Card Transactions: A rule-based dataset containing 24 million transactions from 20,000 users, used for fraud detection and generative modeling.
- Beijing PM2.5 Data: A public dataset of air pollution measurements used for a regression task to predict pollutant concentrations.
Results and Discussion
The effectiveness of TabBERT's learned representations was demonstrated across classification and regression tasks. As summarized in Table 1, using TabBERT features significantly outperformed raw data baselines.
In the fraud detection task, an LSTM using frozen TabBERT features achieved an F1 score of 0.86, compared to 0.83 for an LSTM on raw data. For pollution prediction, the RMSE dropped from 43.3 (raw) to 32.8 (TabBERT).
For synthetic generation, TabGPT successfully captured user-specific temporal distributions. Using a custom Fréchet Inception Distance (FID) metric based on TabBERT embeddings, the model achieved an FID of 22.90 for "User 1" against real data, whereas the distance between two different real users was 492.92.
Conclusion
This research demonstrates that treating tabular sequences as a language allows transformers to learn powerful representations and generate realistic synthetic data. While the reliance on quantization may discard some precision, the hierarchical approach of TabBERT and the generative capabilities of TabGPT offer promising paths for privacy-preserving data sharing and improved predictive modeling in enterprise pipelines.
Summary updated