The problem
An e-commerce platform needed a more scalable way to detect customers and orders associated with potentially fraudulent or abusive behavior. The existing system was an unsupervised Isolation Forest working at customer-category level. It surfaced only a small number of cases, approximately two per day, and its predictions were too broad for transaction-specific intervention. The redesign had to increase detection coverage while keeping control over false positives and customer friction.
What was built
The team redesigned the workflow from a customer-category anomaly detector into a supervised risk-scoring system at order level. The training target was constructed from several existing sources:
- Customers identified by the previous anomaly-detection model
- Customers manually classified as risky by domain experts
- Orders subsequently placed by those customers
- Historical operational risk statuses and review outcomes
This converted machine-generated and expert-reviewed signals into a labeled dataset suitable for supervised learning. Features combine customer-level patterns over the longer term, order-level characteristics of an individual transaction, and customer-order interactions. The interactions let the model distinguish a generally unusual customer from a specifically suspicious order.
The system automates dataset construction, temporal data splits, categorical encoding, hyperparameter optimization, model training and batch inference. Risk thresholds were generally set around a predicted probability of 0.90, and can be raised when a more conservative policy is required.
Results
Reviewable volume rose from approximately two customer-category cases per day to an initial range of approximately 50–100 risky customers per day. High-risk cases could be removed from automatic payment processing and routed to manual review. Risk teams received probabilities that support prioritization, not only binary anomaly flags, and thresholds can be adapted to the cost of false positives.
Where it applies
The same path applies wherever an experimental anomaly detector has to become an operational supervised system, with weak-label construction, expert feedback, threshold governance and human-in-the-loop decisions.