TFMLab
0:00 / 0:00

One embedding, many products #Embeddings#Fine-tuning

5 Oct 2026Beginner0:38Transaction foundation models from scratch · Ep 12

The same customer vector feeds fraud, credit, churn, offers and look-alike search.

Once the encoder exists, each new use case is a small head — so the second product costs a fraction of the first.

Transcript

This vector holds one card's sixty-four numbers, right after a payment. Six empty sockets wait on the right. How many products can read that vector, without a new encoder? By the end, you'll know how one frozen vector can feed six products, each with a head of its own. And why only one of them is tested so far, and only together with strong features.

Start with one payment. The encoder, the part that reads payments, reads it with the card's history, using one point two nine million learned numbers. Out come sixty-four numbers, computed once for this payment. Whatever reads it next reads these same numbers. Now the new word: frozen. In this design, once the encoder is trained, no product changes it, so no product changes these numbers. Remember the heads from the first film? It called them small. Each product puts its own head on top of this vector.

Here is a head of its own. It learns from one product's labels, and needs no new encoder. Its labels are that product's own: for fraud, which payments turned out to be fraud. In our base design it's an MLP, a plain neural network: sixty-four numbers in, then two layers of five hundred and twelve. At the end, one score. For fraud, higher means more likely to be fraud. Training it moves only its own numbers: two hundred and ninety-six thousand, four hundred and forty-nine of them. Next to the encoder's one point two nine million, that's almost a quarter. A head of its own is not tiny. But the encoder stays as it is. The next product brings its own labels, and its own head.

Now the six sockets, as the lab imagines them. Fraud: how far this payment strays from the card's own baseline. Credit risk: affordability and volatility, read from cash flow. Personalization: offers timed to the habit, not to a segment. Recommendation: which merchant comes next. Loyalty: how strong each habit is, merchant by merchant. Retention: the expected next payment stops happening.

Only one socket has a published test: fraud, on IBM's TabFormer data, tested out of time, on a later year. Its real inputs: seventy-three fraud features, the same ones the tree gets, plus the sixty-four numbers, into an MLP. The vector came from the pretrained encoder, frozen, as in this design. The score is the first film's, PR-AUC: near one when frauds rank first, with few false alarms. The tree to beat, XGBoost, a standard tree model, on the same features, scores zero point nine four two. The MLP on features alone: zero point nine seven one. Add the sixty-four numbers: zero point nine seven four. So on top of strong features, the vector adds three thousandths. The Results page puts it in its own words. The same MLP without the embeddings scores PR-AUC zero point nine seven one and catches ninety-nine point five percent, so most of the gain over XGBoost is the network's; the embeddings add on top. That's the paper's ablation, Table three. Catches, there, means the share of fraud caught at one false alarm in a thousand.

Recommendation has results too, but outside the fan: the same recipe on other data, with its own model. Four public datasets of what people watch or buy next, from the first film. No payments, and no head on this vector. The score: how often the real next item is in the top ten guesses. The rival: T-RoPE, the preprint from the first film. Our TFM recipe scores eighteen to a hundred and fifty-three percent higher. Those best runs score every item in training; the paper's loss samples a hundred and twenty-eight. With the preprint’s own loss: three to sixty-nine percent. With its whole recipe: one and forty-six percent, on the two datasets where it ran.

So here's the honest count. One of six is tested, fraud, and only together with its features. Five sockets stay outlined: credit risk, personalization, recommendation, loyalty, retention. Next merchant sounds like the recommendation result. It isn't: that was other data, with its own model. No numbers for the five yet.

Then why build it this way? Three design reasons. One: the vector is computed once per payment, however many products read it. Two: every product reads the same summary of behaviour, so every product starts from the same picture of the card. Three: a new product needs labels and a head, not a new pretraining. Here a TFM parts from a language model. A language model is usually prompted, one task at a time. A TFM’s vector is built to be read by many heads at once, inside a bank’s own systems.

To recap: one frozen vector, a head of its own per product, and so far one product tested, with its features. The vector is ready. Does each product read it the moment a payment lands, or overnight? That's the next episode.