# Why Great Models Fail: Lessons From 9 Years of Deploying ML Models - Megan Robertson

## Executive summary

The talk outlines critical lessons from deploying ML models in production, arguing that model accuracy alone is insufficient for real-world success. Success requires rigorous project scoping, continuous monitoring infrastructure, and ensuring the model's value proposition (Value Ad) significantly outweighs its maintenance cost and potential risks. Key failure points include minimal stakeholder consultation, ignoring data drift, and failing to plan for inevitable changes in the operational environment.

## Key takeaways

- Stakeholder Value is Paramount: The model's value must be quantifiable (KPI) and its contribution must outweigh the cost of maintenance. Stakeholders must guide the project scope, preventing engineers from building technically cool but commercially irrelevant solutions.
- Scope Definition is a Multi-Step Process: Proper scoping requires defining who is served (stakeholders/end users), clearly articulating the problem, understanding constraints and risks, identifying possible solutions (MVP approach: crawl, walk, run), and planning maintenance.
- ML Models Require Continuous Monitoring: Since models are trained on a single point in time, they must be monitored for performance degradation. Strategies include tracking data issues (e.g., distribution changes), feature drift, and model-specific metrics (e.g., Mean Absolute Error, F1 scores).

## Technical details

- Model Drift Types: Models can fail due to several types of drift: Concept Drift (change in relationship between input and target variables), Data Drift (change in underlying feature distributions, e.g., seasonal products), Label Drift (change in the target variable distribution, e.g., competitor launch increasing churn), and Reality Drift (rapid, drastic changes in the world).
- ML Pipeline Failure Points: A production pipeline can fail at multiple stages: Data Ingestion (e.g., vendor schema change), Feature Generation (potential for feature drift), Model Training (overfitting, model file corruption), and Serving (latency issues, dependency failure). Robust monitoring must be implemented across all these points.
- Statistical Testing & Metrics: To monitor data integrity, statistical tests like the Chi-square and Kolmogorov-Smirnov test can assess if underlying distributions have changed. Performance metrics vary by task: Mean Absolute Error/Mean Squared Error for value prediction; Precision, Recall, F1 scores for classification; Semantic Similarity for language modeling.

## Practical implications

- Implement robust monitoring systems that track data distribution changes (Data Drift) and model performance metrics in real-time.
- Prioritize stakeholder interviews during the scoping phase to ensure the project solves a high-value business problem, rather than focusing solely on technical novelty.
- Adopt a 'crawl, walk, run' approach for Minimum Viable Products (MVP), starting with the simplest solution that proves value before adding complexity.
- Always calculate the risk of incorrect predictions. If the potential catastrophic outcome is too high, the model should not be deployed.

## Topics

Machine Learning Operations (MLOps), Model Deployment, Data Drift and Concept Drift, Project Scoping, Statistical Modeling, Ben Wilson's book: Machine Learning Engineering and Action

Source: https://www.youtube.com/watch?v=WKQFUmn-WSc
