TFMLab
0:00 / 0:00

One model, many fintech products #fintech#businessbanking#fraud

19 Oct 2026Beginner0:47

See how one transaction foundation model learns from every business account's transactions and powers fraud alerts, cash-flow forecasts and credit decisions.

A business-banking fintech (Mercury is one example of this kind of company) sees millions of transactions from many business accounts. A Transaction foundation model (TFM) reads each account's history as a sequence — amount, merchant category, hour, country, channel — and turns it into one embedding. Small task heads then reuse that embedding for fraud alerts, cash-flow forecasts and credit decisions, so the expensive learning happens once. The accounts, transactions and scores shown are illustrative. They do not describe how any real company's system works.

Transcript

Nine a.m., a payroll lands. Our card model reads it as "large".

A design agency's payroll: eighteen thousand five hundred dollars. A startup's software charge: twelve hundred and forty. Can one model tell them apart? Two more accounts join them: a café and an online shop. Four made-up business accounts, and one model trained on consumer card payments. By the end, you'll know why our card model puts both in one amount bin, and what a business model would need instead.

One day, one payment each. Two fourteen in the morning: the startup pays twelve hundred and forty dollars by card, for software. Seven thirty: the café pays a supplier eighty-six dollars, by card. Nine: the agency runs payroll, eighteen thousand five hundred dollars, by A C H, a bank transfer. Five past eleven at night: the online shop pays three thousand one hundred dollars for ads, by card.

How does our TFM read an amount? Not in dollars. It reads a bin: one slot on a ruler. Four fifty and four sixty share a bin, from four forty-seven to four sixty-four, as the film on payments into numbers showed. Here are all two hundred real amount bins of our tokenizer, the part that turns a payment into tokens. They were fitted on Sparkov's public consumer card payments. Now the four business amounts drop on.

The café's eighty-six dollars lands in a bin about a dollar wide: eighty-five fourteen to eighty-six twenty-two. Card payments crowd at small amounts, so the bins are narrow there. Now the top bin. It starts at eight hundred and forty-five dollars twenty-eight, and has no upper edge. The largest card payment it was fitted on: twenty-eight thousand nine hundred and forty-eight dollars ninety. Anything larger lands here too. So the software charge, the ad bill and the payroll share one bin. To the amount field, they are the same value.

Here a TFM differs from ChatGPT. A language model's tokenizer splits a word it has never seen into pieces it knows. Un, believ, ably: three pieces it has seen before. An amount tokenizer like ours has no pieces to fall back on. Everything past its last edge piles into one bin. So before a card model reads a new kind of book, its amounts need their own fit.

The amount bin is one of twelve fields our setup reads for each payment. Three compare the amount with a history: the card's usual amount, the merchant's usual, and the merchant's largest. So two payments in one amount bin can still differ there. But these too were fitted on consumer payments.

So what would a business TFM need? Four pieces. Its own amount bins, fitted on business payments. Its payment rails: card, A C H, wire and instant payments. Counterparties and invoices: who is paid, and for what. And the account as the unit it follows, not the card.

Take the same eighteen thousand five hundred dollars, on two histories. On the agency's own history, a run of A C H payrolls, it would read as payroll. On an account with no such history, it would be something to check. That reading comes from the account's own past, through attention: which earlier payments matter for this one.

With one shared model, three heads, small models on top, could answer. Here is what their answers would look like. Fraud: an odd card charge at two fourteen in the morning. Risk zero point eight seven: hold and ask. Cash flow for the café: about four thousand two hundred dollars coming in, net, over the next thirty days. Credit for the agency: approve, with a twenty-five-thousand-dollar card limit.

What is tested? For business banking, nothing yet. Only the bins here are measured.

So the decision: before a card model reads business accounts, check where their amounts land, and refit the bins first. For a data scientist: look at your top bin. If payroll and software share it, the amount field cannot tell them apart. The same idea, a different book: one cardholder's payments, with an insurance premium and a garage repair beside them. What could an insurer read in a customer's payments? That's the next episode.

In code (PyTorch)

emb = tfm(tx_tokens)            # [accounts, d]
fraud  = fraud_head(emb).sigmoid()
cash   = cash_head(emb)          # next 30 days
credit = credit_head(emb).sigmoid()