Loop A — fast, label-free
runningPSI on each feature (covariate) and on the score (prediction drift) using credit-risk bands (<0.10 stable, 0.10–0.25 warn, >0.25 drift), plus CBPE — a label-free ROC-AUC estimate from the calibrated scores.
Real-time payment-fraud detection · MLOps reference
The model is the easy part. The MLOps lifecycle around it is the job — validation, leakage-safe splitting, governance, drift monitoring and a self-retraining loop. This one page is the whole story, top to bottom; every capability is running — measured from the repository, no inflated numbers.
The lifecycle · end to end
IEEE-CIS gives 590,540 labeled transactions across 434 columns (~432 predictors). Before anything trains, a Pandera schema enforces types, ranges and a null-rate budget, and a leakage check quarantines any field only known after the event. Fraud is just 3.5% — the imbalance the whole pipeline is built around.
Monitoring & drift — the self-retraining loop
Fraud labels arrive 7–60 days late as chargebacks, so monitoring can’t wait for them. Two loops bridge the gap, and a compound gate decides when to retrain.
PSI on each feature (covariate) and on the score (prediction drift) using credit-risk bands (<0.10 stable, 0.10–0.25 warn, >0.25 drift), plus CBPE — a label-free ROC-AUC estimate from the calibrated scores.
A windowed backtest on settled labels with bootstrap confidence intervals — so a dip only counts when it’s beyond sampling noise. This confirms or refutes the CBPE estimate.
The compound gate · try it
A blind retrain on a benign shift can ship a worse model — so auto-retrain triggers only when feature drift and a real performance drop co-occur. Flip the window and watch the gate decide.
Simulated here: drift is injected on a held-out window (the IEEE-CIS dataset is static). Detection, the gate, and the retrain trigger are the same code paths that watch live traffic in production. The 0.913 baseline is ROC-AUC on the monitoring reference window (the 59,054-row calibration slice) — a different reference point than the 0.915 out-of-time headline, not a second measurement of it.
The problem
On 590,540 IEEE-CIS transactions only 3.5% are fraud. Two traps make naïve metrics lie: a random split lets the future leak into training (inflating ROC-AUC toward ~0.96), and ROC-AUC itself looks healthy even when precision at the alert threshold is poor.
Train / calib / eval split strictly on TransactionDT, never random — the eval set is the latest 20% of time, so the score is honest about the future. running
At 3.5% prevalence, average precision (PR-AUC 0.552) reflects an alert budget — reported ahead of ROC-AUC (0.915). running
Every encoder is fit on the training split only and is label-free; point-in-time joins never reach forward in time. running
The model · read PR-AUC first
Every number is measured on the frozen out-of-time eval set — the latest 20% of time, never a random split. The operating point is a deliberate choice, not 0.5: precision is set against an alert budget, so recall is always reported at a fixed precision. The fuller reasoning — and what each choice costs — is in Decisions.
Responsible by construction
Native LightGBM pred_contrib TreeSHAP — exact Shapley values, ~20 ms, attached to every decision (no separate explainer service).running
Per-segment ROC-AUC (product, card, device) via Fairlearn holds 0.88–0.95across the major segments (overall 0.915); weakest is Discover at 0.81 on ~1.3k txns — model risk, not protected-class “fairness”.running
Model card (SR 11-7 / MRM + EU AI Act fraud-detection carve-out) and a SHA-256 hash-chain audit log, with S3 Object-Lock WORM as the immutable cloud store.card + hash-chain S3 WORM
Engineering
Every choice here buys something and pays for something — the trade-offs made on purpose. This is the part an interviewer actually wants to hear.
Cost & latency
No GPU anywhere in the path. A depth-12 LightGBM scores in milliseconds on commodity CPU — which is what makes scale-to-zero hosting genuinely cheap.
Throughput is the batched per-core figure (BentoML adaptive batching). The champion is deployed on a scale-to-zero CPU container (Modal, auth-gated): it spins up on demand and idles when nothing is in flight — score one live (access on request) under Try it. measured local deployed · Modal
The stack
No exotic dependencies. The interesting part is the lifecycle that connects them, not any single library.
Plus pytest (116 tests) + GitHub Actions CI, DVC data versioning, and ports & adapters throughout — every external dependency swaps between a local mock and its real counterpart behind one flag.
What’s built
Every figure is counted from the repository or measured on the model — an MLOps maturity Level 1→2 reference.
Lifecycle checklist — 18 running
The whole lifecycle is one Dagster asset graph that materializes end-to-end on a sample — all 10 assets. A GitHub Actions workflow runs lint + the 116-test suite on every push.
Try it
Browse real held-out transactions and watch the champion model decide — the fraud probability, the decision at the operating threshold, and the TreeSHAP features behind it. Real outputs, precomputed (the model is deterministic, so they’re identical to a live call) — or switch to a live call against the deployed, auth-gated endpoint (sign-in required; demo credentials by email).
Precomputed by default (instant, deterministic). Switch to Score live for a real call to the deployed, auth-gated endpoint — sign in with demo credentials, granted by email.
Choose a sample
Transaction
Native pred_contrib. Gold pushes toward fraud; sage pushes toward legitimate.
How this demo is honest
Illustrative examples across the model's risk spectrum. Input display-fields are synthetic and schema-representative (the champion LightGBM scores a full 455-feature vector, not these six fields); the fraud probabilities, decisions, and TreeSHAP attributions shown are the model's real, deterministic behaviour on held-out data. The probabilities and SHAP values above are exactly what the champion model (lgbm-fraud-d12-569t) produced for these held-out IEEE-CIS transactions — nothing is invented. The same champion is deployed live behind an auth-gated CPU endpoint — and because the model is deterministic, these precomputed results are identical to a live call. running
Every figure on this page is read from the repository or measured on the champion model — no inflated numbers, every capability running. Take it for a spin.
The builder
MLPipeline Pro is my work end to end — the pipeline, the gates, the drift loop, the governance, and this page. I’m open to ML-platform, MLOps, and backend roles.
Educational demo on the public IEEE-CIS benchmark — illustrative, not a production fraud system; the sample transaction fields shown are synthetic and schema-representative.