SlideShare a Scribd company logo
Challenges and Considerations for
Productionizing Recommender Systems
Personalized
recommendations
Users’
data
RecSys
Recommender Systems
Everything is a recommendation, once
you see them, they are everywhere
Everything is a recommendation, once
you see them, they are everywhere
Everything is a recommendation
Classical recommendation model
Three types of entities: Users, Items and Contexts
1. A background knowledge:
• A set of ratings – preferences
• r: Users x Items x Contexts --> {1, 2, 3, 4, 5}
• A set of “features” of the Users, Items and Contexts
2. A method for predicting the function r where it is unknown:
• r*(u, i, c) = Average ratings r(u’, i, c’): users u’ are similar to u and context c’ is
similar to c
3. A method for selecting the items to recommend (choice):
• In context c recommend to u the item i* with the largest predicted rating
r*(u,i,c)
The goal is to find items that the user will
happily choose
The goal is to find items that the user will
happily choose
How do we build it?
Requirements surrounding RecSys
Sculley, David, et al. "Hidden technical debt in machine learning systems." Advances in neural information processing systems 28 (2015).
Requirements surrounding RecSys
Sculley, David, et al. "Hidden technical debt in machine learning systems." Advances in neural information processing systems 28 (2015).
User
Modeling
Scoping
1. Decide the recommendation paradigm and degree of
personalization
• Resources and product
• Type of user we are catering to
2. KPI metrics:
• Online: CVR, CTR, ad-hoc metrics
• Offline: recall, nDCG
Ricci, Francesco, Lior Rokach, and Bracha Shapira. "Recommender systems: introduction and challenges." Recommender systems handbook (2015): 1-34.
Scoping
• Define the project
• Define KPI metrics
Data
• Features
• Type of feedback
• Cleaning
• Transformation
Modelling
• Select model
• Offline test model
• Check
fairness/explainability
• UAT
Deployment
• Deploy in production
• A/B testing
• Continuous
Monitoring
The life cycle of a recommender
Scoping
• Define the project
• Define KPI metrics
Data
• Features
• Type of feedback
• Cleaning
• Transformation
Modelling
• Select model
• Offline test model
• Check
fairness/explainability
• UAT
Deployment
• Deploy in production
• A/B testing
• Continuous
Monitoring
1. Features:
• Reusable
• Transformable
• Interpretable
• Reliable
2. Type of feedback
• Implicit data is (usually):
• More dense, and available
for all users
• Better representative of
user behavior vs. user
reflection
• More related to final
objective function ○ Better
correlated with AB test
results
• E.g. Rating vs watching
3. Cleaning
• Dropping bots
• Missing data strategy
• Standardisation
• Bucketing
Beliakov, Gleb, Tomasa Calvo, and Simon James. "Aggregation of preferences in recommender systems." Recommender systems handbook (2011): 705-734.
Big Data Pipelines
On-Premises
Edge
Cloud
Databases
Application
Servers
Mainframes
Logs IoT
Data Stores
Replication and Ingestion
Streaming Ingestion
Data Integration
Data Lake
Data Integration
Data Cleaning
Recommender
Data Producers Data Pipeline Data Consumer
Data Warehouse
Data preparation
Scoping
• Define the project
• Define KPI metrics
Data
• Features
• Type of feedback
• Cleaning
• Transformation
Modelling
• Select model
• Offline test model
• Check
fairness/explainability
• UAT
Deployment
• Deploy in production
• A/B testing
• Continuous
Monitoring
1. Features:
• Reusable
• Transformable
• Interpretable
• Reliable
2. Type of feedback
• Implicit data is (usually):
• More dense, and available
for all users
• Better representative of
user behavior vs. user
reflection
• More related to final
objective function ○ Better
correlated with AB test
results
• E.g. Rating vs watching
3. Cleaning
• Dropping bots
• Missing data strategy
• Standardisation
• Bucketing
Beliakov, Gleb, Tomasa Calvo, and Simon James. "Aggregation of preferences in recommender systems." Recommender systems handbook (2011): 705-734.
Modelling
Scoping
• Define the project
• Define KPI metrics
Data
• Features
• Type of feedback
• Cleaning
• Transformation
Modelling
• Select model
• Offline evaluation
• Check
fairness/explainability
• UAT
Deployment
• Deploy in production
• A/B testing
• Continuous
Monitoring
Latency is key!
RecSys paradigmes
Collaborative Filtering Content-based Knowledge-based
Collaborative Filtering
Coba, L., Rook, L., Zanker, M., & Symeonidis, P. (2019, March). Decision making strategies differ in the presence of collaborative explanations: two conjoint studies. IUI 19.
Content-based
Dominguez, V., Messina, P., Donoso-Guzmán, I., & Parra, D. (2019, March). The effect of explanations and algorithmic accuracy on visual recommender systems of artistic images. IUI 2019.
Coba, L.
Knowledge-based
Selecting the model
• There is no single winner
• Usually, models are ensembled
• Multi-stage architectures are
common
• Live predictions or in batches
• DNNs are not always deployable
(cost-benefit tradeoff and latency)
A non personalized recommender
• We can use a hybrid
recommender: collaborative
filtering + content based
• Collaborative filtering suffers
from cold start, but it is better
performing
• If the catalogue doesn’t
change often then we can pre-
compute interactions
Non-personalized recommender
Edge device
API Call
Recommendations
Pre-computed
recommendations
Non-personalized recommender
Edge device
API Call
Recommendations
ANN
Search
Annoy (Approximate Nearest Neighbors Oh Yeah) is a C++ library with Python bindings to search for points in space that are close to a given query point https://github.com/spotify/annoy
Scalable personalized recommender
Covington, Paul, Jay Adams, and Emre Sargin. "Deep neural networks for youtube recommendations." Proceedings of the 10th ACM conference on recommender systems. 2016.
Scalable personalized recommender
Amatrian, Xavier. “Blueprints for recommender system architectures: 10th anniversary edition.” https://amatriain.net/blog/RecsysArchitectures
Modelling
Scoping
• Define the project
• Define KPI metrics
Data
• Features
• Type of feedback
• Cleaning
• Transformation
Modelling
• Select model
• Offline evaluation
• Check
fairness/explainability
• UAT
Deployment
• Deploy in production
• A/B testing
• Continuous
Monitoring
• Latency is key!
• Choose the right architecture based on the situation
• Pick the right metrics:
• recall for retrieval
• nDCG or MRR for ranking @ K, or precision if ranking is irrelevant
• Go beyond traditional metrics, measure diversity, novelty and see whether the models are biased
• UAT
• Define data contracts
Deploying
1. Test
Scoping
• Define the project
• Define KPI metrics
Data
• Features
• Type of feedback
• Cleaning
• Transformation
Modelling
• Select model
• Offline test model
• Check
fairness/explainability
• UAT
Deployment
• Deploy in production
• A/B testing
• Continuous
Monitoring
Deploying
1. Test – high code coverage
Scoping
• Define the project
• Define KPI metrics
Data
• Features
• Type of feedback
• Cleaning
• Transformation
Modelling
• Select model
• Offline test model
• Check
fairness/explainability
• UAT
Deployment
• Deploy in production
• A/B testing
• Continuous
Monitoring
Deploying
1. Test – high code coverage
Scoping
• Define the project
• Define KPI metrics
Data
• Features
• Type of feedback
• Cleaning
• Transformation
Modelling
• Select model
• Offline test model
• Check
fairness/explainability
• UAT
Deployment
• Deploy in production
• A/B testing
• Continuous
Monitoring
Deploying
1. Test – high code coverage
2. Test
Scoping
• Define the project
• Define KPI metrics
Data
• Features
• Type of feedback
• Cleaning
• Transformation
Modelling
• Select model
• Offline test model
• Check
fairness/explainability
• UAT
Deployment
• Deploy in production
• A/B testing
• Continuous
Monitoring
Deploying
1. Test – high code coverage
2. Test – smart deployment strategy
Scoping
• Define the project
• Define KPI metrics
Data
• Features
• Type of feedback
• Cleaning
• Transformation
Modelling
• Select model
• Offline test model
• Check
fairness/explainability
• UAT
Deployment
• Deploy in production
• A/B testing
• Continuous
Monitoring
Tech debt sources
• Glue code
• Pipeline Jungles
• Dead Experimental Codepaths
• Plain-Old-Data Type Smell
• Multiple-Language Smell
• Prototype Smell
• Reproducibility Debt
• Cultural Debt
Deploying
1. Test – high code coverage
2. Test – smart deployment strategy
3. Test
Scoping
• Define the project
• Define KPI metrics
Data
• Features
• Type of feedback
• Cleaning
• Transformation
Modelling
• Select model
• Offline test model
• Check
fairness/explainability
• UAT
Deployment
• Deploy in production
• A/B testing
• Continuous
Monitoring
Deploying
1. Test – high code coverage
2. Test – smart deployment strategy
3. Test – A/B testing, interleaving or MAB
Scoping
• Define the project
• Define KPI metrics
Data
• Features
• Type of feedback
• Cleaning
• Transformation
Modelling
• Select model
• Offline test model
• Check
fairness/explainability
• UAT
Deployment
• Deploy in production
• A/B testing
• Continuous
Monitoring
Deploying
1. Test – high code coverage
2. Test – smart deployment strategy
3. Test – A/B testing, interleaving or MAB
4. Keep monitoring
Scoping
• Define the project
• Define KPI metrics
Data
• Features
• Type of feedback
• Cleaning
• Transformation
Modelling
• Select model
• Offline test model
• Check
fairness/explainability
• UAT
Deployment
• Deploy in production
• A/B testing
• Continuous
Monitoring
Continuous monitoring
• Feedback Loops
• Direct Feedback Loops
• Hidden Feedback Loops
• Data drift
• Action Limits
• Prediction Biases
• Performance Deterioration
Thank you!
Questions?
https://www.slideshare.net/LudovikCoba
https://www.linkedin.com/in/ludovik-coba-8b96a0154/
https://scholar.google.at/citations?user=gsj8LcwAAAAJ&hl=en

More Related Content

Similar to productionising-recommenders

HCI(Human Computer Interaction)-PPT-REPORT.pptx
HCI(Human Computer Interaction)-PPT-REPORT.pptxHCI(Human Computer Interaction)-PPT-REPORT.pptx
HCI(Human Computer Interaction)-PPT-REPORT.pptx
vliencycapateiii
 
[UPDATE] Udacity webinar on Recommendation Systems
[UPDATE] Udacity webinar on Recommendation Systems[UPDATE] Udacity webinar on Recommendation Systems
[UPDATE] Udacity webinar on Recommendation Systems
Axel de Romblay
 
Modern Perspectives on Recommender Systems and their Applications in Mendeley
Modern Perspectives on Recommender Systems and their Applications in MendeleyModern Perspectives on Recommender Systems and their Applications in Mendeley
Modern Perspectives on Recommender Systems and their Applications in Mendeley
Maya Hristakeva
 
Preference Elicitation Interface
Preference Elicitation InterfacePreference Elicitation Interface
Preference Elicitation Interface
晓愚 孟
 
Udacity webinar on Recommendation Systems
Udacity webinar on Recommendation SystemsUdacity webinar on Recommendation Systems
Udacity webinar on Recommendation Systems
Axel de Romblay
 
Trends in-om-scm-27-july-2012-2
Trends in-om-scm-27-july-2012-2Trends in-om-scm-27-july-2012-2
Trends in-om-scm-27-july-2012-2
Sanjeev Deshmukh
 
Best Practices in Recommender System Challenges
Best Practices in Recommender System ChallengesBest Practices in Recommender System Challenges
Best Practices in Recommender System Challenges
Alan Said
 
Building High Available and Scalable Machine Learning Applications
Building High Available and Scalable Machine Learning ApplicationsBuilding High Available and Scalable Machine Learning Applications
Building High Available and Scalable Machine Learning Applications
Yalçın Yenigün
 
Chapter 15 software product metrics
Chapter 15 software product metricsChapter 15 software product metrics
Chapter 15 software product metrics
SHREEHARI WADAWADAGI
 
Book Recommendations.pptx
Book Recommendations.pptxBook Recommendations.pptx
Book Recommendations.pptx
DishaSharma337110
 
bookrecommendations-230615063942-3b1016c9 (1).pdf
bookrecommendations-230615063942-3b1016c9 (1).pdfbookrecommendations-230615063942-3b1016c9 (1).pdf
bookrecommendations-230615063942-3b1016c9 (1).pdf
13DikshaDatir
 
Production and Beyond: Deploying and Managing Machine Learning Models
Production and Beyond: Deploying and Managing Machine Learning ModelsProduction and Beyond: Deploying and Managing Machine Learning Models
Production and Beyond: Deploying and Managing Machine Learning Models
Turi, Inc.
 
Business Analytics Forum #BAF3
Business Analytics Forum #BAF3Business Analytics Forum #BAF3
Business Analytics Forum #BAF3
Simon Harrison ACMA CGMA
 
MLOps and Data Quality: Deploying Reliable ML Models in Production
MLOps and Data Quality: Deploying Reliable ML Models in ProductionMLOps and Data Quality: Deploying Reliable ML Models in Production
MLOps and Data Quality: Deploying Reliable ML Models in Production
Provectus
 
New model
New modelNew model
New model
TEST Huddle
 
A New Model For Testing
A New Model For TestingA New Model For Testing
A New Model For Testing
TEST Huddle
 
Group 1 Report CRISP - DM METHODOLOGY.pptx
Group 1 Report CRISP - DM METHODOLOGY.pptxGroup 1 Report CRISP - DM METHODOLOGY.pptx
Group 1 Report CRISP - DM METHODOLOGY.pptx
ellamangapis2003
 
Interactive SDLC
Interactive SDLCInteractive SDLC
Interactive SDLC
Shahriar Iqbal Chowdhury
 
Qlcl bao cao
Qlcl bao caoQlcl bao cao
Qlcl bao cao
Luong Tien Dat
 
ML Application Life Cycle
ML Application Life CycleML Application Life Cycle
ML Application Life Cycle
SrujanaMerugu1
 

Similar to productionising-recommenders (20)

HCI(Human Computer Interaction)-PPT-REPORT.pptx
HCI(Human Computer Interaction)-PPT-REPORT.pptxHCI(Human Computer Interaction)-PPT-REPORT.pptx
HCI(Human Computer Interaction)-PPT-REPORT.pptx
 
[UPDATE] Udacity webinar on Recommendation Systems
[UPDATE] Udacity webinar on Recommendation Systems[UPDATE] Udacity webinar on Recommendation Systems
[UPDATE] Udacity webinar on Recommendation Systems
 
Modern Perspectives on Recommender Systems and their Applications in Mendeley
Modern Perspectives on Recommender Systems and their Applications in MendeleyModern Perspectives on Recommender Systems and their Applications in Mendeley
Modern Perspectives on Recommender Systems and their Applications in Mendeley
 
Preference Elicitation Interface
Preference Elicitation InterfacePreference Elicitation Interface
Preference Elicitation Interface
 
Udacity webinar on Recommendation Systems
Udacity webinar on Recommendation SystemsUdacity webinar on Recommendation Systems
Udacity webinar on Recommendation Systems
 
Trends in-om-scm-27-july-2012-2
Trends in-om-scm-27-july-2012-2Trends in-om-scm-27-july-2012-2
Trends in-om-scm-27-july-2012-2
 
Best Practices in Recommender System Challenges
Best Practices in Recommender System ChallengesBest Practices in Recommender System Challenges
Best Practices in Recommender System Challenges
 
Building High Available and Scalable Machine Learning Applications
Building High Available and Scalable Machine Learning ApplicationsBuilding High Available and Scalable Machine Learning Applications
Building High Available and Scalable Machine Learning Applications
 
Chapter 15 software product metrics
Chapter 15 software product metricsChapter 15 software product metrics
Chapter 15 software product metrics
 
Book Recommendations.pptx
Book Recommendations.pptxBook Recommendations.pptx
Book Recommendations.pptx
 
bookrecommendations-230615063942-3b1016c9 (1).pdf
bookrecommendations-230615063942-3b1016c9 (1).pdfbookrecommendations-230615063942-3b1016c9 (1).pdf
bookrecommendations-230615063942-3b1016c9 (1).pdf
 
Production and Beyond: Deploying and Managing Machine Learning Models
Production and Beyond: Deploying and Managing Machine Learning ModelsProduction and Beyond: Deploying and Managing Machine Learning Models
Production and Beyond: Deploying and Managing Machine Learning Models
 
Business Analytics Forum #BAF3
Business Analytics Forum #BAF3Business Analytics Forum #BAF3
Business Analytics Forum #BAF3
 
MLOps and Data Quality: Deploying Reliable ML Models in Production
MLOps and Data Quality: Deploying Reliable ML Models in ProductionMLOps and Data Quality: Deploying Reliable ML Models in Production
MLOps and Data Quality: Deploying Reliable ML Models in Production
 
New model
New modelNew model
New model
 
A New Model For Testing
A New Model For TestingA New Model For Testing
A New Model For Testing
 
Group 1 Report CRISP - DM METHODOLOGY.pptx
Group 1 Report CRISP - DM METHODOLOGY.pptxGroup 1 Report CRISP - DM METHODOLOGY.pptx
Group 1 Report CRISP - DM METHODOLOGY.pptx
 
Interactive SDLC
Interactive SDLCInteractive SDLC
Interactive SDLC
 
Qlcl bao cao
Qlcl bao caoQlcl bao cao
Qlcl bao cao
 
ML Application Life Cycle
ML Application Life CycleML Application Life Cycle
ML Application Life Cycle
 

Recently uploaded

Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 

Recently uploaded (20)

Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 

productionising-recommenders

  • 1. Challenges and Considerations for Productionizing Recommender Systems
  • 3. Everything is a recommendation, once you see them, they are everywhere
  • 4. Everything is a recommendation, once you see them, they are everywhere
  • 5. Everything is a recommendation
  • 6. Classical recommendation model Three types of entities: Users, Items and Contexts 1. A background knowledge: • A set of ratings – preferences • r: Users x Items x Contexts --> {1, 2, 3, 4, 5} • A set of “features” of the Users, Items and Contexts 2. A method for predicting the function r where it is unknown: • r*(u, i, c) = Average ratings r(u’, i, c’): users u’ are similar to u and context c’ is similar to c 3. A method for selecting the items to recommend (choice): • In context c recommend to u the item i* with the largest predicted rating r*(u,i,c)
  • 7. The goal is to find items that the user will happily choose
  • 8. The goal is to find items that the user will happily choose
  • 9. How do we build it?
  • 10. Requirements surrounding RecSys Sculley, David, et al. "Hidden technical debt in machine learning systems." Advances in neural information processing systems 28 (2015).
  • 11. Requirements surrounding RecSys Sculley, David, et al. "Hidden technical debt in machine learning systems." Advances in neural information processing systems 28 (2015). User Modeling
  • 12. Scoping 1. Decide the recommendation paradigm and degree of personalization • Resources and product • Type of user we are catering to 2. KPI metrics: • Online: CVR, CTR, ad-hoc metrics • Offline: recall, nDCG Ricci, Francesco, Lior Rokach, and Bracha Shapira. "Recommender systems: introduction and challenges." Recommender systems handbook (2015): 1-34. Scoping • Define the project • Define KPI metrics Data • Features • Type of feedback • Cleaning • Transformation Modelling • Select model • Offline test model • Check fairness/explainability • UAT Deployment • Deploy in production • A/B testing • Continuous Monitoring
  • 13. The life cycle of a recommender Scoping • Define the project • Define KPI metrics Data • Features • Type of feedback • Cleaning • Transformation Modelling • Select model • Offline test model • Check fairness/explainability • UAT Deployment • Deploy in production • A/B testing • Continuous Monitoring 1. Features: • Reusable • Transformable • Interpretable • Reliable 2. Type of feedback • Implicit data is (usually): • More dense, and available for all users • Better representative of user behavior vs. user reflection • More related to final objective function ○ Better correlated with AB test results • E.g. Rating vs watching 3. Cleaning • Dropping bots • Missing data strategy • Standardisation • Bucketing Beliakov, Gleb, Tomasa Calvo, and Simon James. "Aggregation of preferences in recommender systems." Recommender systems handbook (2011): 705-734.
  • 14. Big Data Pipelines On-Premises Edge Cloud Databases Application Servers Mainframes Logs IoT Data Stores Replication and Ingestion Streaming Ingestion Data Integration Data Lake Data Integration Data Cleaning Recommender Data Producers Data Pipeline Data Consumer Data Warehouse
  • 15. Data preparation Scoping • Define the project • Define KPI metrics Data • Features • Type of feedback • Cleaning • Transformation Modelling • Select model • Offline test model • Check fairness/explainability • UAT Deployment • Deploy in production • A/B testing • Continuous Monitoring 1. Features: • Reusable • Transformable • Interpretable • Reliable 2. Type of feedback • Implicit data is (usually): • More dense, and available for all users • Better representative of user behavior vs. user reflection • More related to final objective function ○ Better correlated with AB test results • E.g. Rating vs watching 3. Cleaning • Dropping bots • Missing data strategy • Standardisation • Bucketing Beliakov, Gleb, Tomasa Calvo, and Simon James. "Aggregation of preferences in recommender systems." Recommender systems handbook (2011): 705-734.
  • 16. Modelling Scoping • Define the project • Define KPI metrics Data • Features • Type of feedback • Cleaning • Transformation Modelling • Select model • Offline evaluation • Check fairness/explainability • UAT Deployment • Deploy in production • A/B testing • Continuous Monitoring Latency is key!
  • 17. RecSys paradigmes Collaborative Filtering Content-based Knowledge-based
  • 18. Collaborative Filtering Coba, L., Rook, L., Zanker, M., & Symeonidis, P. (2019, March). Decision making strategies differ in the presence of collaborative explanations: two conjoint studies. IUI 19.
  • 19. Content-based Dominguez, V., Messina, P., Donoso-Guzmán, I., & Parra, D. (2019, March). The effect of explanations and algorithmic accuracy on visual recommender systems of artistic images. IUI 2019.
  • 21. Selecting the model • There is no single winner • Usually, models are ensembled • Multi-stage architectures are common • Live predictions or in batches • DNNs are not always deployable (cost-benefit tradeoff and latency)
  • 22. A non personalized recommender • We can use a hybrid recommender: collaborative filtering + content based • Collaborative filtering suffers from cold start, but it is better performing • If the catalogue doesn’t change often then we can pre- compute interactions
  • 23. Non-personalized recommender Edge device API Call Recommendations Pre-computed recommendations
  • 24. Non-personalized recommender Edge device API Call Recommendations ANN Search Annoy (Approximate Nearest Neighbors Oh Yeah) is a C++ library with Python bindings to search for points in space that are close to a given query point https://github.com/spotify/annoy
  • 25. Scalable personalized recommender Covington, Paul, Jay Adams, and Emre Sargin. "Deep neural networks for youtube recommendations." Proceedings of the 10th ACM conference on recommender systems. 2016.
  • 26. Scalable personalized recommender Amatrian, Xavier. “Blueprints for recommender system architectures: 10th anniversary edition.” https://amatriain.net/blog/RecsysArchitectures
  • 27. Modelling Scoping • Define the project • Define KPI metrics Data • Features • Type of feedback • Cleaning • Transformation Modelling • Select model • Offline evaluation • Check fairness/explainability • UAT Deployment • Deploy in production • A/B testing • Continuous Monitoring • Latency is key! • Choose the right architecture based on the situation • Pick the right metrics: • recall for retrieval • nDCG or MRR for ranking @ K, or precision if ranking is irrelevant • Go beyond traditional metrics, measure diversity, novelty and see whether the models are biased • UAT • Define data contracts
  • 28. Deploying 1. Test Scoping • Define the project • Define KPI metrics Data • Features • Type of feedback • Cleaning • Transformation Modelling • Select model • Offline test model • Check fairness/explainability • UAT Deployment • Deploy in production • A/B testing • Continuous Monitoring
  • 29. Deploying 1. Test – high code coverage Scoping • Define the project • Define KPI metrics Data • Features • Type of feedback • Cleaning • Transformation Modelling • Select model • Offline test model • Check fairness/explainability • UAT Deployment • Deploy in production • A/B testing • Continuous Monitoring
  • 30. Deploying 1. Test – high code coverage Scoping • Define the project • Define KPI metrics Data • Features • Type of feedback • Cleaning • Transformation Modelling • Select model • Offline test model • Check fairness/explainability • UAT Deployment • Deploy in production • A/B testing • Continuous Monitoring
  • 31. Deploying 1. Test – high code coverage 2. Test Scoping • Define the project • Define KPI metrics Data • Features • Type of feedback • Cleaning • Transformation Modelling • Select model • Offline test model • Check fairness/explainability • UAT Deployment • Deploy in production • A/B testing • Continuous Monitoring
  • 32. Deploying 1. Test – high code coverage 2. Test – smart deployment strategy Scoping • Define the project • Define KPI metrics Data • Features • Type of feedback • Cleaning • Transformation Modelling • Select model • Offline test model • Check fairness/explainability • UAT Deployment • Deploy in production • A/B testing • Continuous Monitoring
  • 33. Tech debt sources • Glue code • Pipeline Jungles • Dead Experimental Codepaths • Plain-Old-Data Type Smell • Multiple-Language Smell • Prototype Smell • Reproducibility Debt • Cultural Debt
  • 34. Deploying 1. Test – high code coverage 2. Test – smart deployment strategy 3. Test Scoping • Define the project • Define KPI metrics Data • Features • Type of feedback • Cleaning • Transformation Modelling • Select model • Offline test model • Check fairness/explainability • UAT Deployment • Deploy in production • A/B testing • Continuous Monitoring
  • 35. Deploying 1. Test – high code coverage 2. Test – smart deployment strategy 3. Test – A/B testing, interleaving or MAB Scoping • Define the project • Define KPI metrics Data • Features • Type of feedback • Cleaning • Transformation Modelling • Select model • Offline test model • Check fairness/explainability • UAT Deployment • Deploy in production • A/B testing • Continuous Monitoring
  • 36.
  • 37. Deploying 1. Test – high code coverage 2. Test – smart deployment strategy 3. Test – A/B testing, interleaving or MAB 4. Keep monitoring Scoping • Define the project • Define KPI metrics Data • Features • Type of feedback • Cleaning • Transformation Modelling • Select model • Offline test model • Check fairness/explainability • UAT Deployment • Deploy in production • A/B testing • Continuous Monitoring
  • 38. Continuous monitoring • Feedback Loops • Direct Feedback Loops • Hidden Feedback Loops • Data drift • Action Limits • Prediction Biases • Performance Deterioration