Design a credit card fraud detection system
PremiumML systemMedium
- Fraud detection
- Class imbalance
- Delayed labels
Quick answer
This ML system interview question asks you to design a credit card fraud detection system. Aim for a design that turns data into useful predictions in production, then explain the data, training, serving and monitoring. Interviewers want to see how you frame the problem, measure success and keep the model healthy after launch.
The problem
Design a credit card fraud detection system for a large bank that issues credit cards: score every card payment in real time and decide to approve, ask for extra verification or decline. The hard parts are fraud being only 0.1% of payments, labels that arrive up to 90 days later and fraudsters who change tactics.
A wrong decline embarrasses a real customer at the checkout and may push them to use another card for good. A wrong approval costs the issuer the payment amount. The decision must fit inside the card authorisation call, which waits for an answer.
What must a credit card fraud detection system do?
- Real-time decision: Return approve, verify (one-time code or in-app confirmation) or decline for every payment.
- Reason codes: Give the top reasons behind each verify or decline for analysts and customer support.
How well must it do it?
- Latency: Scoring takes no more than 50 ms p99 inside a 300 ms authorisation.
- False declines: No more than 0.1% of legitimate payments are declined.
What scale should you design for?
Use these numbers in your estimates.
The scale numbers unlock with this questionUnlock
Key concepts
- Fraud detection
- Class imbalance
- Delayed labels
- Velocity features
- Real time scoring
- Cost sensitive learning
How you’ll practise
- Problem framing
- Data and labels
- Features and model
- Training and evaluation
- Serving and monitoring
- Wrap-up
Lala, personalized to you, gives a hint when you ask and reviews your design when you are ready.
What do interviewers look for?
In any ML system design round.
- Frames the product goal as a clear ML problem
- Defines offline and online success metrics
- Explains where the data and labels come from
- Separates training from serving and keeps features consistent
- Plans for drift, retraining and rollbacks
- Weighs model quality against latency and cost
Questions people ask about this interview question
- Which design type is this question?
- It is an ML system question. You design a credit card fraud detection system and explain your choices the way you would in an interview.
- Is this question asked at entry level?
- It is marked Medium. Entry-level engineers can practise it, but it expects you to reason about requirements and trade-offs, not only list components.
- What should I cover first?
- Start with the product goal, how success is measured and what data is available. Agree on scope with the interviewer before you design anything.
- Can I practise it for free?
- It is a premium question. Sign up and unlock it once for 10 credits; it then stays unlocked. When you finish, Lala, your personalized AI mentor, can review your design for 30 credits.
Related questions
Updated · Written by the SevyDevy team