Problem
A bank that scores loan applications already has three neural networks, built on card transactions, the current account and the credit bureau. Card transactions show where and how much a client paid but not what was bought. Current-account transactions name the purpose but are irregular. One extra Gini point is worth hundreds of millions of rubles a year to the bank.
Example from the article: a model applied in January 2023 uses one year of receipts. Training applications must be old enough for the one-year default target to mature, so receipts are bought for about three and a half years.
Solution in brief
Buy cash register receipts from a fiscal data operator (OFD), clean the item text with regular expressions and flatten the nested receipts into one sequence of items. A network embeds each item with FastText and an LSTM, runs a second LSTM over the sequence and outputs a default score. That score becomes a fourth input to the logistic regression over the existing scores.
Questions this case answers
- How to turn nested purchase-history records with messy free-text item names into a fixed-length input for a default-risk model
- How to collect an external data source for model training so that every training example has the same history window as at inference time
- How to turn item-level purchase receipts into sequence features for a credit scoring model?
- How to prepare messy receipt line-item text (abbreviations, SKU codes, glued words) for a neural network?
Tools and methods
- FastText — word vectors for item descriptions, trained on the whole receipt corpus
- Regular expressions — splitting glued text, removing long article codes, replacing every number with "1"
- Binning plus embedding layers — categorical features from price, quantity and total
- LSTM with pooling — one over the tokens of an item, one over the sequence of items
- Logistic regression — combines the scores of the four neural networks
Google or a one-time email code. No password.