Design Fraud-Risk Scoring for Protected Actions
Design a bounded-latency fraud decision and learning loop that handles new actors and rare, delayed labels.
Problem statement
For this exercise, assume a neutral online service asks for a fraud-risk decision before committing each protected action. An action has a stable ID, actor ID, action kind and privacy-limited context. The system returns ALLOW, REVIEW or DENY with reason codes and the exact policy, feature and model versions used.
A retry of the same action must recover the same committed decision; hard safety controls cannot be bypassed by a model or feature timeout. Reviewers may later confirm fraud, confirm a legitimate action, or leave it unresolved. Unreviewed actions have unknown labels, not negative labels.
Design the online decision path, nearline features, review and feedback loop, offline training and evaluation, and a safe model release. The protected-action domain and numerical targets below are exercise assumptions.
The exercise excludes committing the underlying action, writing fraud policy, and collecting raw personal identifiers.
What to build
- The caller can idempotently obtain one auditable ALLOW, REVIEW or DENY decision before it commits a protected action, including an explicit degraded outcome when risk inputs fail.
- Consented action and outcome events update versioned nearline and offline features without allowing future information into an earlier decision or training example.
- Reviewers can resolve selected cases, while the system preserves unknown outcomes, evaluates rare fraud fairly, and promotes or rolls back compatible policy and model versions.
At scale
- For this exercise, assume five million protected actions per day, a peak of 1,000 decision requests per second, and a 120 ms p95 decision target including feature fetch, model scoring and policy combination.
- For this exercise, assume confirmed fraud is about 0.5% of mature, reliably labeled actions and authorized review capacity is 20,000 cases per day; the rest may remain unreviewed or unresolved.
- For this exercise, assume consented event features should reach the online scorer within two minutes, confirmed outcomes may arrive up to 30 days later, and decision evidence is retained for 90 days.