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
November 29, 20260
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
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- 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 ProblemsSample 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...