Abstract
Visa Research introduces TransactionGPT (TGPT), a foundation model specifically designed for "Multi-Modal-Temporal-Tabular" (MMTT) consumer transaction data. By utilizing a novel 3D-Transformer architecture and a "virtual token" mechanism, TGPT achieves a 22% improvement in anomaly detection over competitive production models and outperforms 7B-parameter LLMs in domain-specific tasks while being 300x faster.
Introduction: The Challenge of MMTT Data
While foundation models have revolutionized Natural Language Processing (NLP) and Computer Vision (CV), the payments industry has faced unique hurdles. Transaction data is inherently Multi-Modal-Temporal-Tabular (MMTT). Unlike sequential text or spatial images, a single transaction is a complex record containing categorical metadata (e.g., Merchant ID), numerical features (e.g., Transaction Amount), and temporal context (e.g., Timestamp).
Standard Large Language Models (LLMs) are computationally inefficient for this data because they lack the structure to handle high-cardinality fields—such as millions of unique merchants—alongside dense numerical features. Furthermore, existing tabular models often fail to capture the long-term temporal "trajectories" of consumer spending habits.
Methods: The 3D-Transformer Architecture
The authors propose a 3D-Transformer architecture that hierarchically encodes data across three distinct dimensions to address these complexities:
- Feature Transformer: Encodes downstream-specific numerical and categorical features.
- Metadata Transformer: Processes core transaction attributes like Amount, MCC, and Merchant ID. It utilizes Compositional Embeddings (a hashing technique) to manage millions of unique merchants without an explosion in parameter count.
- Temporal Transformer: A decoder-only backbone that treats each transaction as a "token" to predict future spending trajectories.
The Virtual Token Layer (VTL)
To fuse these dimensions without creating a computational bottleneck, the authors introduced the Virtual Token Layer. Instead of simply concatenating all features—which often leads to "information dilution" or out-of-memory errors—VTL compresses high-dimensional feature sets into a fixed number of "virtual tokens." This allows the model to maintain high information bandwidth while keeping the sequence length manageable for the Temporal Transformer.
Experimental Setup and Datasets
The model was trained on billion-scale real-world transactions from a major payment network. Evaluation was conducted across three curated datasets:
- T-JGC: 100M sequences for transaction generation and anomaly detection.
- T-RES: 200M sequences of restaurant transactions to evaluate "dining trajectories" and merchant embeddings.
- T-MCC: 1M sequences used to benchmark TGPT against fine-tuned LLMs for Merchant Category Code (MCC) prediction.
Key Insights
- Architectural Alignment vs. Scale: A 56M-parameter TGPT model outperformed a 7B-parameter Llama-2 model on MCC prediction. This suggests that for structured, non-linguistic data, domain-specific architecture is more critical than raw parameter count.
- Normalization Strategy: In a departure from standard Transformer practice, the authors found that BatchNorm consistently outperformed LayerNorm. This is attributed to the highly diverse cardinalities and multi-modal nature of tabular data.
- Emergent Geographic Understanding: Through UMAP visualizations, the authors discovered that TGPT learned to cluster merchants by physical proximity (e.g., cities and airports) purely from transaction sequences, without explicit GPS data.
Results and Performance
- Anomaly Detection: TGPT-3D-FMT achieved a 22% relative improvement in performance over a strong, competitive production model.
- Efficiency: TGPT is 300x faster at inference than fine-tuned LLMs (0.27ms vs 84.9ms per transaction).
- Predictive Accuracy: In merchant prediction (selecting 1 out of 3 million possible merchants), TGPT achieved over 30% Recall@1, significantly outperforming sequential recommendation baselines like SASRec.
- Scaling Laws: The research confirms that transaction models follow scaling laws similar to LLMs; performance improved consistently as training data scaled from 10 million to 1 billion transactions.
Conclusion
TransactionGPT demonstrates that foundation models can be successfully adapted to the complex world of payments. By moving beyond simple 1D sequences to a 3D-Transformer approach with Virtual Token Layers, TGPT provides a scalable, efficient, and highly accurate framework for financial modeling. Future work will explore the joint optimization of MMTT models with LLMs and further acceleration for real-time payment authorization.
Summary updated