InteractiveLabs

Explore hands-on implementations that bring each chapter to life. Experience real-world banking AI through immersive, code-driven learning that transforms complex concepts into actionable insights.

Chapter 2
New case

Reading Neighborhoods from Above with CNNs

Can a height map of a neighborhood tell how deprived it is? Using open LiDAR data for Greater London, this lab follows the chapter's algorithms step by step: it trains a CNN from scratch and fine-tunes a pretrained EfficientNet. It then tests whether the image adds to the structured data a bank already has, with a validation design that respects geography.

Original book case, corrected: LiDAR and loan delinquency in US areas
Chapter 3
Updated

Forecasting Delinquencies with Deep Learning

Dive into sequential modeling using LSTM and GRU architectures to forecast loan delinquency trends. This lab introduces key techniques for temporal prediction using real-world loan performance data.

Chapter 4
New lab

From DistilBERT to ModernBERT: Reading the Fed's Stance

Our new lab for 2026. It fine-tunes DistilBERT, as in the chapter, and ModernBERT, a modern encoder released at the end of 2024, to read whether Federal Reserve speeches from 1997 to 2024 are hawkish, dovish or neutral. It follows a current workflow: labels made with a language model and checked by people, models tested on years they never saw, and simple baselines next to every model.

Original lab: Fed speeches and the economic activity index
Chapter 5

Modeling Relationships in Loan Data with GNNs

This lab transforms Freddie Mac loan data into graph structures and applies Graph Neural Networks—including GCN, GAT, and GraphSAGE—to predict mortgage defaults. Learn how relational learning improves predictive accuracy in financial contexts.

Chapter 6

Prompt Engineering and Fine-Tuning with LLaMA

Learn how to harness LLaMA 3.2B for domain-specific financial tasks. This lab covers prompt design, model customization, and practical fine-tuning techniques to build more intelligent language-based systems in banking.

Chapter 7
New lab

Payment Histories and the Loan Network

Our new lab for 2026. It treats a mortgage as three modalities: its application data, its 24-month payment history, and its neighbors in the network of loans that share a region, a seller or a servicer. A three-branch network fuses them, and the lab compares it with late and residual fusion on top of XGBoost. With no hand-made features, the raw modalities reach the level of a benchmark built on them, and the test data cannot tell the two apart. Two placebos, one with shuffled payments and one with reassigned groups, show that both signals are real. The lab closes with transactional foundation models, the next step of the same idea.

Original lab: text, images, time series and tabular data
Chapter 8

Building Ethical and Transparent AI Models

A two-part lab focused on responsible AI. First, evaluate credit scoring fairness across demographic groups. Then, use SHAP to interpret predictions from language models—reinforcing trust and transparency in model outputs.

Extra lab
Not in the book

Foundation Models for Credit: Tables and Transaction Histories

Our extra lab for 2026, on a topic the book does not cover. It builds on the mortgages of the Chapter 3 lab and the fusion of the Chapter 7 lab. It pretrains a tiny tabular foundation model (NanoDPT) on synthetic tables, scores loans without fitting against XGBoost and the released TabDPT 1.3, pretrains a small PRAGMA-style encoder on the monthly loan histories, and combines the two. It closes with the check a model validator would run: how much the scores move when the context changes. It runs in about 1.5 hours on a Colab T4 GPU.