KatInterview

Real-Time Risk Scoring for Account Linking and Payments

Machine LearningModel answer
MediumModel answerMachine Learningfraud-detectionml-system-designgraph-features

Last updated

Design an ML pipeline that scores bank-link attempts, identity checks, and transactions in real time, mapping risk to graded actions while keeping false positives low.

You are building the risk layer for a financial data-connectivity platform. Users connect their bank accounts to third-party apps, verify who they are, and then move or expose financial data. Bad actors try to abuse each of these stages.

Design an ML system that spots risky users, account connections, and transactions close to real time. The output should drive one of four graded responses: allow, step-up verification, manual review, or block. Legitimate users must almost never be interrupted, so the false-positive rate has to stay very low.

Your design should cover:

  1. Which fraud scenarios you target, and how you frame the prediction problem.
  2. Data sources and how you construct labels.
  3. Features, including relational or graph-based signals.
  4. Modeling approach.
  5. The offline training pipeline and the online serving architecture.
  6. Offline and online evaluation.
  7. Delayed labels, class imbalance, adversarial adaptation, privacy and compliance, and monitoring.

Assumptions for sizing

  • Millions of end users, thousands of bank and partner integrations.
  • Tens of millions of link attempts and transaction events per day, with thousands of requests per second at peak.
  • The user flow waits on the decision, so p99 scoring latency should be tens to low hundreds of milliseconds.
  • Confirmed fraud (chargebacks, partner reports, account closures) shows up days to weeks later. Positives are well under 1% of events, and some fraud is never reported.
  • Attackers probe the system, adapt, reuse devices, IPs, and accounts, and work in rings.
  • Financial PII is involved. Decisions may need reason codes and must not cause disparate impact on protected groups.

State any clarifying questions you would ask (decision point, available labels, cost of a miss vs. a false block, regulatory limits) and the assumptions you make in their absence.

Hints

Hint 1

Start by picking one decision point (for example the link attempt) and defining the target, the action thresholds, and the cost of each error type before discussing models.

Hint 2

Labels mature slowly and are biased by past decisions: think about maturation windows, excluding immature negatives, time-based splits, and how blocked traffic never reveals its true label.

Hint 3

Combine cheap deterministic rules, a supervised gradient-boosted scorer on velocity/device/graph features, and an offline-computed graph signal served from a feature store, with a safe fallback if any dependency is slow.