Quality assurance · Production

Lyft builds distributed ML model profiling pipeline for large-scale anomaly detection

The problem

LyftLearn hosts a large and growing number of ML models making hundreds of millions of predictions daily, with features and traffic patterns varying so widely across models that a single monitoring logic could not cover them all — and a prior z-score approach generated too many false positives to be useful.

First attempt

A prior z-score-based anomaly detection approach produced too many false positives because model features and predictions can deviate statistically without implying a real problem, with seasonality being a key cause.

Workflow diagram · grounded in source
1
Inference request sampling
trigger
“We instrument all inference requests, sample and store a certain percentage of model inference requests and emitted predictions.”
2
Distributed Whylogs profiling
ai_action
“we use spark to spawn multiple executors to load the features and predictions data for those models and generate Whylogs data profiles for those features per model, every hour, every day in a distributed manner”
3
Hourly-to-daily profile merge
integration
“we can now leverage the partial profile merge capability of Whylogs profiles to combine all the hourly profiles to generate a daily profile”
4
Profile persistence
output
“We can go as deep as we want and persist the Whylogs profile into the database”
Reported outcome

All model features and predictions are now automatically profiled daily via a distributed pipeline built on Spark, Fugue, and Whylogs, with new models onboarded automatically and no manual action required.

Reported metrics
Model features and predictions profiling coverageautomatically profiled daily
Model onboarding effortUsers do not need to take any action when new models are introduced
Reported stack
SparkWhylogsFugueKubernetesHive
Source
https://eng.lyft.com/building-a-large-scale-unsupervised-model-anomaly-detection-system-part-1-aca4766a823c
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

All model features and predictions are now automatically profiled daily via a distributed pipeline built on Spark, Fugue, and Whylogs, with new models onboarded automatically and no manual action required.

What tools did this team use?

Spark, Whylogs, Fugue, Kubernetes, Hive.

What results were reported?

Model features and predictions profiling coverage: automatically profiled daily; Model onboarding effort: Users do not need to take any action when new models are introduced (source-reported, not independently verified).

What failed first in this deployment?

A prior z-score-based anomaly detection approach produced too many false positives because model features and predictions can deviate statistically without implying a real problem, with seasonality being a key cause.

How is this quality assurance AI workflow structured?

Inference request sampling → Distributed Whylogs profiling → Hourly-to-daily profile merge → Profile persistence.