Large-Scale Transformer models for Transactional Data

Fabrizio Garuti, Simone Luetto, Enver Sangineto, Rita CucchiaraItal-IA 2024

Abstract

Transactional data in the financial sector is characterized by heterogeneous features and complex temporal dependencies. Traditional tree-based models often struggle with these sequences without extensive manual feature engineering. We present UniTTab, a hierarchical Transformer architecture designed for transactional time series. By employing self-supervised pre-training on millions of unlabeled transactions, UniTTab achieves state-of-the-art performance in loan default and churn prediction, outperforming both traditional ensembles and existing deep learning baselines.

Introduction

Financial institutions manage vast repositories of transactional data, which are essentially sequences of tabular entries including timestamps, amounts, and categorical descriptors. Historically, the industry has favored tree-based ensembles like XGBoost and CatBoost. However, these models require "flattening" time-series data into static aggregates, losing granular temporal information. Furthermore, they lack the capacity to model long-range dependencies across extended transaction histories. UniTTab addresses these limitations by treating financial histories as a structured language, leveraging the scaling properties of Transformers.

Methodology

UniTTab (Unified Transformer for Time-Dependent Heterogeneous Tabular Data) utilizes a two-stage hierarchical architecture to process transactional sequences.

Hierarchical Architecture

  1. Field Transformer: This module encodes individual transactions. It processes $k$ heterogeneous features into a unified transaction embedding. Numerical values are handled using frequency-based encoding (sine functions) to preserve precision, while categorical and temporal data are mapped via standard embedding layers.
  2. Sequence Transformer: This higher-level module processes the sequence of transaction embeddings (up to 150 steps) to capture temporal statistical dependencies.
UniTTab architecture for pre-training and fine-tuning

Training Strategy

The model follows a pre-train and fine-tune paradigm. During pre-training, a Masked Token task is used where specific fields or entire transactions are hidden, forcing the model to learn the underlying semantics of banking behavior from unlabeled data. For downstream tasks, a [CLASS] token is introduced to the sequence for classification.

Experimental Setup

The model was evaluated on two datasets:

  • PKDD’99 Financial Dataset: A public dataset containing 1 million transactions for loan default prediction.
  • Real Bank Account Transaction (RBAT) Dataset: A large-scale private dataset containing hundreds of millions of transactions used for customer churn prediction.

Results

UniTTab demonstrates significant performance gains over traditional and deep learning baselines. On the PKDD’99 dataset, it achieved an F1 score of 0.673, surpassing TabBERT (0.620) and XGBoost (0.608).

Performance comparison across pre-training portions

A key finding is the impact of self-supervised pre-training. As shown in the results, UniTTab's performance scales with the amount of unlabeled data used during the pre-training phase. Even with only 25% of the pre-training data, the model begins to outperform traditional tree-based methods.

Discussion and Conclusion

UniTTab proves that Deep Learning can effectively scale for transactional data, provided the architecture accounts for the heterogeneous nature of the input. While Transformers introduce higher computational overhead compared to tree-based models, the ability to automate feature engineering and capture long-term dependencies offers a clear advantage for large-scale financial forecasting. Future work will focus on extending sequence lengths and exploring more efficient Transformer variants to handle multi-year transaction histories.

Summary updated

BibTeX
@inproceedings{garuti2024large,
  author = {Fabrizio Garuti and Simone Luetto and Enver Sangineto and Rita Cucchiara},
  title = {{Large-Scale Transformer models for Transactional Data}},
  booktitle = {Ital-IA},
  year = {2024},
  url = {https://openreview.net/forum?id=A1AXKyPIN3},
}
Figure