PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/ML System Design/PayPal

Design fraud detection from raw transactions

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's ability to design an end-to-end transaction fraud detection system, testing competencies in feature engineering, handling delayed and partial labels and class imbalance, real-time feature retrieval and model serving, decision thresholding under manual-review constraints, feedback-loop integration, monitoring, and backtesting. It is commonly asked in ML system design interviews to assess both conceptual understanding and practical application of production machine learning and data engineering trade-offs in the ML System Design domain for data scientist roles.

  • hard
  • PayPal
  • ML System Design
  • Data Scientist

Design fraud detection from raw transactions

Company: PayPal

Role: Data Scientist

Category: ML System Design

Difficulty: hard

Interview Round: Onsite

You receive a large multi-table dataset of transactions and customer/merchant metadata with delayed or partial fraud labels. Design an end-to-end system to decide whether each transaction is fraudulent. Cover feature engineering (velocity, graph/link features, device/IP signals), handling class imbalance and label latency, training/validation splits that prevent leakage, thresholding for review capacity, real-time scoring and latency budgets, feedback loops from manual review/chargebacks, monitoring (drift, TPR/FPR, approval rate), and a backtesting plan.

Quick Answer: This question evaluates a candidate's ability to design an end-to-end transaction fraud detection system, testing competencies in feature engineering, handling delayed and partial labels and class imbalance, real-time feature retrieval and model serving, decision thresholding under manual-review constraints, feedback-loop integration, monitoring, and backtesting. It is commonly asked in ML system design interviews to assess both conceptual understanding and practical application of production machine learning and data engineering trade-offs in the ML System Design domain for data scientist roles.

Related Interview Questions

  • Design a traditional fraud detection system - PayPal (hard)
  • Design RL-based spending limit policy - PayPal (hard)
  • Detect credit-card transaction fraud - PayPal (hard)
PayPal logo
PayPal
Jul 31, 2025, 12:00 AM
Data Scientist
Onsite
ML System Design
4
0

System Design: End-to-End Transaction Fraud Detection

Context

You are given a large, multi-table dataset of transactions and customer/merchant metadata. Fraud labels arrive with delays (e.g., chargebacks weeks later) and may be partial (e.g., only for reviewed or disputed transactions). Design an end-to-end system to decide, in real time, whether to approve, decline, or send each transaction to manual review.

Requirements

Cover the following aspects with clear assumptions and rationale:

  1. Data and Feature Engineering
    • Velocity features (multi-horizon counts/sums/uniques).
    • Graph/link features across entities (user/card/email/device/IP/merchant).
    • Device and IP signals (fingerprinting, geolocation, proxy/TOR, ASN risk).
  2. Labels, Class Imbalance, and Latency
    • Handling severe class imbalance.
    • Handling delayed/partial labels and selective-label bias.
  3. Training and Validation Splits
    • Splitting to avoid leakage in time and across entities.
    • Ensuring offline/online feature parity.
  4. Decision Thresholding and Review Capacity
    • Approve/Decline/Review policy with cost-sensitive thresholds.
    • Meeting a fixed manual review capacity.
  5. Real-Time Scoring and Latency Budgets
    • Online feature retrieval and model serving under strict latency.
    • Fallbacks and degradation strategies.
  6. Feedback Loops
    • Incorporating manual review outcomes and chargebacks.
    • Exploration/holdout strategies to mitigate bias.
  7. Monitoring and Alerting
    • Drift (input/output), TPR/FPR with delayed labels, calibration, approval/decline rates, review queue health.
  8. Backtesting Plan
    • Time-ordered replay, off-policy evaluation, simulation of review capacity, metrics and confidence intervals.

State reasonable assumptions if needed and justify key design choices.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More ML System Design•More PayPal•More Data Scientist•PayPal Data Scientist•PayPal ML System Design•Data Scientist ML System Design
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.