Design Invalid Click Detection for Ocean Engine Advertisers

Last updated: November 29, 2026

Quick Overview

Design a system that detects fraudulent or invalid ad clicks on ByteDance's advertising platform so advertisers are not charged for them, both in real time and in later batch reconciliation.

ByteDance
ML System Design
Machine Learning Engineer
ByteDance
November 29, 2026
Machine Learning Engineer
System Design Round
ML System Design
Medium

0

0

0 solved


Design a system that detects fraudulent or invalid ad clicks on ByteDance's advertising platform so advertisers are not charged for them, both in real time and in later batch reconciliation.

Ocean Engine is ByteDance's advertising platform for Douyin, Toutiao and partner apps through Pangle, and advertisers pay per click or conversion. The interviewer wants a layered design (rules, real-time models, offline graph analysis) and a clear plan for labels, which are scarce and delayed in fraud problems.

What the Interviewer Expects
  • Separate real-time filtering from offline reconciliation and refunds
  • Combine rules, supervised models, and graph or clustering methods
  • Explain how labels are obtained despite adversaries and delay
  • Choose metrics such as invalid traffic rate, precision at the refund threshold, and advertiser complaints
  • Plan for adversarial adaptation and model refresh
Key Topics to Cover
fraud detection
anomaly detection
graph features
real-time streaming
adversarial ML
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
  • How would you detect a click farm using many real phones?
  • How do you decide the threshold between filtering and charging?
  • How do you handle fraud in a third-party app inside the Pangle network?
  • How would you explain refunds to advertisers?
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
  • Billions of ad clicks per day; real-time decision under 50 ms in the billing path.
  • Catch bots, click farms, click injection on Android, and publisher self-clicking in network apps.
  • Do not charge...
High-Level Design

Clicks stream from the ad server into a scoring service. Layer 1 applies deterministic rules: known bad IPs and data-center ranges, emulator signatures from the SDK, impossible timing (click before re...


Submit Your Answer
Markdown supported