How to Find Out Faster That the Service Is Unwell: Realtime Changepoint Detection with CatBoost

Vladimir Tochilin, Alexander Samusenko30 Mar 2023

Problem

An ad platform (over 1,000,000 RPS on some clusters) must learn about drops in impressions, clicks or money quickly, because releases, hotfixes and invalid experiments break things silently. Data cleaned of fraud and billing arrives more than half an hour late, so monitors on it can catch some drops only an hour later. Fast data has no lag but carries fraud inflows that look like drops, so monitors on it have low recall and not the highest precision, and nobody reacts to noisy alerts. Illustrative example: impressions on one traffic slice fall sharply because the system stopped showing banners on placements. The clean-data monitor fires late, and the fast-data monitor is lost among fraud noise.

Solution in brief

Train a CatBoost classifier on fast, uncleaned five-minute click series, labeling only drops that are also visible on clean data. Add synthetic severe drops to the training set so the model does not miss collapses to zero.

Questions this case answers
  • How to detect sudden drops in a high-volume metric within minutes when the freshest data is noisy and only cleaned data arrives with a delay
  • How to train a supervised detector for rare, severe incidents when labeled history is scarce and labelers disagree
  • How to detect a sudden drop in click or impression metrics within minutes when the fast data is polluted by fraud?
  • How to build a training set for a changepoint classifier when nobody has labeled the history?

Tools and methods

  • CatBoost Classifier — the changepoint classifier, with class weights for imbalance
  • Statistical monitors with narrow confidence intervals — candidate generation for manual labeling (recall ≈ 1)
  • Synthetic drop generation — five drop classes for severe cases that real history lacks
Continue reading — it's free

Google or a one-time email code. No password.