EngineeringAGA—059 min read

Transaction foundation models: transformer embeddings for tabular financial data

By Luis Hasanaj · AI Gen AppsMay 2026

Abstract

A transaction foundation model learns from large volumes of tabular financial data to produce transformer embeddings of individual transaction rows. Fed as features into existing ML models, those embeddings raise accuracy and cut false positives on fraud detection, authorization and risk scoring.

Most financial systems still treat a transaction as a flat set of columns — amount, merchant, timestamp, card, geography. Gradient-boosted trees and logistic models read those columns directly, one row at a time, with no memory of the patterns that connect them. A transaction foundation model changes what a row is. It learns from large volumes of tabular financial data — transaction patterns, merchant histories, financial interactions — and turns each row into a transformer embedding: a dense vector that carries the context those raw columns leave out.

Those embeddings are not the end product. They are features. Fed into the ML models a business already runs, they raise accuracy and reduce false positives on fraud detection, authorization, risk scoring and customer insight — without replacing the systems already in production.

1. Why tabular data needs foundation-model embeddings

Tabular data has been the hard case for foundation models. Language and vision earned their embeddings because tokens and pixels carry structure a transformer can learn across billions of examples. A transaction table looks different: heterogeneous columns, mixed types, no natural sequence. So the field defaulted to gradient-boosted trees, which are strong on a single table but learn nothing transferable. Every new task starts from raw columns again.

The signal a tree cannot reach is relational. Whether a $400 charge is fraud depends on the card's spending history, the merchant's risk profile, the time since the last transaction, and how similar accounts behave. A foundation model can hold that context because it has seen it across the whole dataset. The embedding encodes where this transaction sits in the space of all transactions — the exact prior a per-row model lacks.

2. Tokenizing tabular transactions

The first step is turning a row into a sequence a transformer can read. Each column becomes a token. Numeric fields — amount, balance, elapsed time — are binned and quantized so a continuous value maps to a stable vocabulary entry. Categorical fields — merchant, currency, transaction type, country — map to learned entries directly. High-cardinality fields such as merchant identifiers are hashed into a bounded space so the vocabulary stays finite without discarding identity.

A row becomes an ordered token sequence with column position preserved, so the model learns that the third token is always amount and the seventh is always merchant category. This tokenization is the heavy step at scale, so we run it on GPU-accelerated data processing rather than the CPU. Binning, hashing and encoding happen in-GPU across the full dataset, which keeps the pipeline fed and turns preprocessing from the bottleneck into a pass-through stage.

Transaction foundation model · embedding pipeline
tokenizeself-supervisedfeaturesRaw transactionsstorageRow tokenizerengineTransformer encodermodelEmbedding vectorsstorageFraud modelengineRisk scoringengineAuthorizationengineFraud & risk signalsendpoint

3. Training transformer embeddings at scale

The tokenized transactions train a transformer encoder with a self-supervised objective — masking tokens within a row and predicting them from the rest, so the model learns which combinations of amount, merchant and timing are plausible and which are anomalous. No labels are required at this stage, which matters because raw transactions are abundant and labelled fraud is scarce.

Training runs on GPUs through a foundation-model training framework that handles checkpointing, mixed precision and data parallelism. Throughput is governed by keeping the accelerator saturated: GPU tokenization upstream, GPU-resident arrays in the data loader, and a foundation-model framework that scales the encoder across devices. The output is a single encoder that maps any conforming row to a fixed-width embedding.

Key capabilities

  • A reusable recipe for producing embeddings from tabular transaction data.
  • Tokenization designed for the heterogeneity of financial tables — mixed numeric and categorical columns, high-cardinality identifiers.
  • Self-supervised pre-training that needs no labels, then optional fine-tuning on a labelled task.
  • End-to-end GPU execution, from tokenization through training, optimized for throughput at scale.
  • Embedding features that augment existing ML models rather than replacing them.

4. Augmenting existing ML models

The embeddings are meant to be dropped into pipelines already in production. For a fraud model built on gradient-boosted trees, the integration is additive: run each transaction through the encoder, concatenate its embedding with the original engineered features, and train the same tree model on the widened feature set.

The trees keep the sharp, interpretable splits they are good at and gain the relational context they could not compute themselves. In our fraud baseline this is where the gains show up — higher recall on genuine fraud and, just as important, fewer false positives, because the embedding lets the model distinguish an unusual-but-legitimate purchase from a genuinely anomalous one. The same embeddings feed authorization models, risk scores and customer-insight models with no per-task feature engineering.

5. Generalization

A row is a row. The encoder does not care whether the amount came from a card network, a bank ledger or a capital-markets settlement. Once the tokenization schema is defined, the same architecture generalizes across payment networks, banking institutions, currencies and compliance regimes. New geographies and new transaction types extend the token vocabulary rather than demand a new model.

The principle reaches past finance. Any domain built on large tabular datasets — supply chains, telemetry, clinical records, industrial sensor logs — has the same structure: heterogeneous columns, relational context a per-row model cannot see, and downstream ML that would sharpen given the right features. Tokenize the rows, pre-train the encoder, and the embeddings transfer. Transactions are the proving ground because the volume is enormous and the labels are scarce, which is exactly where learned embeddings pay off.

6. Requirements

RequirementDetail
Hardware1 GPU with 80 GB memory (data-center class) for training and inference
Memory32 GB system RAM
OSA recent Docker-capable Linux distribution (e.g. Ubuntu 22.04)
RuntimeDocker Engine — all dependencies installed via the image
Core stackFoundation-model training/inference framework; deep-learning runtime; transformer model tooling for checkpoint loading
Data pathGPU-accelerated data processing and tokenization; GPU-resident array library; classical ML preprocessing utilities
BaselineGradient-boosted trees for the fraud baseline the embeddings augment

7. Ethical considerations

Models that score financial behaviour can encode and amplify bias present in the training data. Embeddings that improve fraud accuracy must be evaluated for disparate impact across the populations they affect, kept within the relevant regulatory regime, and paired with human review on consequential decisions. Accuracy is necessary but not sufficient; the system has to be fair and accountable to the people it acts on.

Domain
Fintech

Related research

  1. August 2026 · Engineering
    The multimodal shopping assistant: an agentic architecture for open-ended discovery
  2. March 2026 · Engineering
    Agentic commerce: a reference architecture for AI checkout under merchant control
  3. January 2026 · Engineering
    GPU Query Engine (GQE): a reference architecture for GPU-accelerated SQL
More in Engineering