Introduction
Every financial institution that has moved to this approach started from the same observation. A typical credit model reads a fixed row of features. Nubank’s LightGBM baseline for credit default uses 291 of them.2 The customer behind that row produced a salary every month, rent, groceries, transfers to friends, app sessions and, now and then, a payment that tells you more than all the rest. The row keeps curated sums and counts. It drops order, timing and almost everything written in the transaction text.
Over the past two years the largest digital lenders have started to read the events themselves. Nubank combines a transformer over transaction histories with its tabular features and reports a 1.25% relative AUC gain over LightGBM, with 90% of its hand-crafted transaction features made redundant.2 Affirm put a transformer into live US underwriting in September 2026 and reports 3.4% more completed purchases against a control group.3 Revolut trained one encoder on 24 billion events and uses it for credit, fraud and marketing.1 Stripe trains a payments model on tens of billions of transactions,4 and Coinbase builds user models from interaction sequences.6 The research line goes back further, to recurrent models on card transactions for credit in 20197 and self-supervised event embeddings in 2022.5
This article demystifies banking foundation models. We explain how they work, why they work, and illustrate their inner workings with an interactive simulation.
1. The feature table and what it drops
A boosted tree needs a fixed-width row per applicant, so credit teams compress event histories by hand. The standard recipe crosses time windows with aggregations and categories: income over the last 30 days, the number of gambling transactions over 90 days, the lowest month-end balance. Three windows, four aggregations and 13 categories already give 156 columns. Add statement balances and income stability and you have the 168 features our baseline uses.
This works, and it is why boosted trees on hand-built features remain popular in credit. They are fast, comparatively well understood by model validators and easy to explain. But every feature is a decision someone made in advance about what matters. A hidden behavior nobody thought to encode does not reach the model, and hand-built features typically ignore most of the information contained in transaction data.
2. Events as a language
A sequence model skips the feature table. It turns every event into a few tokens and reads a customer’s history the way a language model reads a sentence. Each field of an event becomes its own token: the category, whether money came in or went out, the amount as a bucket on a log scale, the balance after the event, the day of the month, the weekday and the hour. The counterparty name is read as text. The day itself enters as a continuous time position, so the model knows that the rent came three days after the salary.
Two design choices matter more than they look. First, the balance after each event belongs in the input. A bank statement shows it, and without it the model has to add up every amount to know whether the customer is about to go overdrawn. Second, the fields of an event should be embedded separately and concatenated, not added together. Published models make the same choices in different ways. Revolut’s PRAGMA tokenizes every key and value separately and adds the profile state;1 Nubank’s nuFormer uses special tokens for amount, date and sign.2 In our experience these input decisions decide more than model size.
3. Learning without labels
Credit labels are scarce and slow. A default takes months to observe, and most customers never apply for a loan. Their events, however, arrive every day. Foundation models use that asymmetry. During pretraining the model sees complete histories with 15% of events hidden and learns to fill them in: which category, which amount, which counterparty. No default label is involved. To fill in the blanks well, the model has to learn how a customer’s month normally unfolds.
We can check what it learned. After pretraining, before it has seen a single default, we froze the model and asked a linear classifier to read planted behaviors off its output. Within the bettors, it finds the ones who bet in the four days before payday with an AUC of 1.00. The 168 hand-built features score 0.50, a coin flip, because those bettors place the same bets for the same amounts, only on different days.
Pretraining picks up the timing behaviors: bets, balance checks and the payday bridge. It does not learn which counterparty names signal risk, or the hidden instalment. Those the model learns once it is fine-tuned on defaults, which is the next step.
4. Same features, different customers
The clearest way to see the difference is a pair of customers that a feature table cannot tell apart. Our simulator plants four behaviors that change only when things happen. A risky bettor places bets in the days before payday, when the account is nearly empty; a control places the same bets just after payday. A payday bridge is a loan from a friend a few days before payday, repaid right after it; the control gets the same transfers on random days. A hidden instalment is a fixed payment to an ordinary shop the day after every payday. Stressed customers check their balance in the app in the days before payday.
For each behavior we generated 300 twin pairs. The twins share every random draw and differ only in that behavior, and all 168 features are identical within each pair. A boosted tree has to give both twins the same score. The fine-tuned sequence model ranks the riskier twin higher in most pairs.
5. Reading names
Transaction text is where many credit signals live, and it is the part of the data that feature tables handle worst. A team maintains keyword lists for payday lenders, collection agencies and gambling sites, and every new brand slips through until someone adds it. A sequence model can read the name itself. To illustrate the power of using the transaction labels, we give our model a small pretrained sentence encoder (MiniLM, 22 million parameters, running on a CPU) that turns each counterparty name into a vector. Names with similar meaning land close together, including names the model has never seen.
In the simulation, payday-lender borrowers and family borrowers move the same amounts on the same days; only the counterparty differs. The tree on standard features cannot separate them. A tree with an analyst’s keyword list can. The fine-tuned sequence model matches the keyword list, including on four lender names that never appear in training.
6. Does it beat the tree?
Yes, in this simulated example it creates significant gains. On default prediction for 4,000 held-out customers, the sequence model on raw events reaches a ROC AUC of 0.79, against 0.73 for a boosted tree on 168 hand-built features. A tree given five extra features written by an oracle analyst who already knows the planted behaviors reaches 0.80. The sequence model gets there without anyone writing those features.
Two other results matter for planning. Adding the frozen embedding as extra columns to the existing tree already helps, 0.76 against 0.73, with no change to the model type or its explanations. And training the sequence model together with the hand-built features, as Nubank does,2 did not help here (0.77). In our simulation the features are computed from the same events the model reads, so they add nothing new. At a real bank, tabular features include information the events do not hold, such as bureau data, so those are normally added for joint training.
7. How many labels it needs
Pretraining uses every customer’s history, labeled or not, so the sequence model needs fewer labels. We fine-tuned the pretrained model on 1,000 to 16,000 labeled customers. With 2,000 it reaches 0.74, against 0.68 for the tree and 0.70 for the same model trained without pretraining. With 4,000 labels it already beats a tree trained on all 16,000.
8. Where a bank should start
We see three steps, each reversible and each useful on its own.
- Add the embedding to the existing model. Pretrain a sequence model on all customers’ events and add its embedding as extra columns to the current scorecard or tree. The model type, its monitoring and most of its explanations stay as they are. In our simple illustration this alone moved the tree from 0.73 to 0.76.
- Run the sequence model as a challenger. Score applicants with both models and compare outcomes, starting with decisions where explanation rules are lighter, such as fraud, collections or limit increases, or with a second look at applicants the current model would decline. Affirm deployed its model this way.3
- Promote it where it wins. Once the challenger has a record, move it into the decision for the segments where it beats the incumbent, with event-level attributions reviewed by the validation team.
Feature engineering will not disappear. Its job changes: from guessing in advance which behaviors matter, to deciding what each event should carry and checking what the model learned. That is a better use of a credit team’s time.
Work with us. Taktile Labs is working with partners to build and test banking foundation models on real portfolios. If your team wants to try one, please get in touch.
Get in touchHow we ran the experiment
Data. A simulator generates 180 days of events for each customer: salary or gig income, rent, bills, card spending, transfers, loans and app balance checks, about 184 events each. Default depends on income and savings, which hand-built features see, and on six planted behaviors: irregular income, bets before payday, a payday bridge, a hidden instalment, payday-lender loans and balance checks before payday. Each behavior has a control group with the same events at other times or from other counterparties. 16,000 customers train the models, 4,000 test them; the default rate is 16.8%. The best possible ROC AUC given the planted noise is 0.83.
Models. The boosted tree is LightGBM with early stopping on 168 features (window by aggregation by category, monthly statement balances, income stability). The sequence model is a two-layer Transformer with 408,000 parameters, pretrained for six epochs by masking 15% of events and fine-tuned for four on default. Counterparty names pass through character trigrams and a frozen MiniLM encoder.
Limits. The data is synthetic and the behaviors were planted, so the results show mechanisms rather than expected gains.
References
- Ostroukhov et al., PRAGMA: Revolut Foundation Model, arXiv:2604.08649, 2026.
- Braithwaite et al., Your Spending Needs Attention: Modeling Financial Habits with Transformers, KDD Workshop on Machine Learning in Finance, 2026.
- Affirm, Affirm launches transformer-based machine learning model for real-time underwriting, September 2026.
- Stripe, Payments foundation model.
- Babaev et al., CoLES: Contrastive Learning for Event Sequences with Self-Supervision, SIGMOD 2022.
- Coinbase, Scaling Personalization with User Foundation Models.
- Babaev et al., E.T.-RNN: Applying Deep Learning to Credit Loan Applications, KDD 2019.