Point-In-Time Behavioral Feature Store For BEC Detection

Last updated: November 29, 2026

Quick Overview

Design the feature platform that maintains per-sender, per-recipient and per-pair behavioral history (first contact date, message counts, typical send hours, prior replies) for thousands of tenants, serving it online in milliseconds during scoring and reproducing exact historical values for training.

Abnormal Security
ML System Design
Machine Learning Engineer
Abnormal Security
November 29, 2026
Machine Learning Engineer
System Design Round
ML System Design
Hard

0

0

0 solved


Design the feature platform that maintains per-sender, per-recipient and per-pair behavioral history (first contact date, message counts, typical send hours, prior replies) for thousands of tenants, serving it online in milliseconds during scoring and reproducing exact historical values for training.

Abnormal's detections lean on whether a message breaks a sender's or recipient's normal behavior, and those features are only useful if training sees exactly what the scorer saw. The interviewer is probing online and offline consistency, point-in-time correctness to avoid label leakage, hot keys, and privacy-preserving storage.

What the Interviewer Expects
  • Defines entities and example features clearly, including pair-level history
  • Uses one event log as the source for both online and offline values
  • Explains point-in-time joins and why naive joins leak future information
  • Handles hot keys such as all-company senders and bulk mailers
  • Addresses tenant isolation and hashed identifiers
  • Plans backfills when a new feature is added
Key Topics to Cover
feature store
point-in-time correctness
streaming aggregation
training-serving skew
privacy
backfill
How to Approach This
  1. Start by mapping the business objective to a concrete ML objective and metric.
  2. Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
  3. Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
  4. Address the serving latency budget and whether batch or real-time inference is needed.
  5. Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
  • A feature is added today. How do you get two years of training data for it?
  • How do you detect train and serve skew in production?
  • How would cross-tenant signals (a sender seen attacking elsewhere) fit without leaking one customer's data to another?
  • What do you do when a tenant's history is only a week old?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice ML System Design Problems
Sample Answer
Requirements

Entities: sender address, sender domain, recipient, (sender, recipient) pair, vendor. Features: days since first contact, 30 and 365 day message counts, reply ratio, usual sending hour histogram, whet...

High-Level Design

A single interaction event log (Kafka, then a lakehouse table) records each message as (tenant, hashed sender, hashed recipients, ts, direction, thread info). A streaming aggregator (Flink o...


Submit Your Answer
Markdown supported

Related Questions