SlideShare a Scribd company logo
10 Things I Wish I Had Known
Before Scaling Deep Learning
Solutions
Invector Labs
About Invector Labs
• Platform for top-class computer science talent
• Uses artificial intelligence to connect enterprises with top freelance
talent around the world
• Focused on deep tech
• Artificial intelligence
• Blockchain technologies
• Internet of things
• Cybersecurity
• Advanced cloud computing
• ….
• http://invectorlabs.com
Agenda
• Realities of scaling deep learning solutions
• 10 Lessons
• Challenge
• What we learned?
• Solution
Lessons from the Real World
•Using deep learning to analyze reviews form over 40 travel websites
•12 different deep learning models
•Scenarios: topic extraction, sentiment analysis, price predictions, hotel scoring….
•Techniques: Natural language processing, NLP micro understanding, clustering, time series analysis
Large Hospitality
Group
•Using deep learning to extract intelligence from trial discovery documents and legal research
•8 different deep learning models
•Scenarios: Natural language search, knowledge extraction, document relationships, research recommendations, strategy simulation
•Techniques: Convolutional neural networks, generative models, recurrent neural networks, natural language processing….
Legal Software
Platform Vendor
•Using deep learning to analyze cargo information and sensor data
•18 different deep learning models
•Scenarios: Car load predictions, part maintenance prediction, track video analysis
•Techniques: Convolutional neural networks, recurrent neural networks, transfer learning, predictive modeling, linear regressions….
International
Railway Company
•Using deep learning to simulate trading strategies
•11 different deep learning models
•Scenarios: Portfolio rebalancing, option pricing, daily stock selection, strategy selection
•Techniques: Reinforcement learning, transfer learning, predictive modeling
Quant Hedge Fund
Key Takeaways
• Implementing deep solutions at scale imposes new infrastructure
challenges
• Deep learning requires a new type of architecture
Deep Learning?
Deep Learning
• Deep learning is a subset of machine learning.
• Uses a hierarchy of multiple layers of nonlinear processing units for
feature extraction and transformation. Each successive layer uses the
output from the previous layer as input.
• Learns in supervised (e.g., classification) and/or unsupervised (e.g.,
pattern analysis) manners.
• Learns multiple levels of representations that correspond to different
levels of abstraction; the levels form a hierarchy of concepts.
Deep Learning Sub-Disciplines
Deep
Learning
Convolutional
Neural
Networks
Recurrent
Neural
Networks
Adversarial
Neural
Networks
Reinforcement
Learning
Generative
Models
Transfer
Learning
….
What Makes Deep Learning so Challenging?
Curse of Dimensionality
• Models with millions of nodes
Over/Under Fitting
• Models too tailored to the datasets
Interpretability
• Understanding complex network structures
Bias/Variance
• Preconceptions included in the datasets
Implementing Deep Learning in the Enterprise is
Brutally Hard
But not just because of the obvious reasons…
10 painful, non-trivial lessons we learned while
building deep learning solutions at scale…
Lesson #1: Data Scientists Make Horrible
Engineers…
Challenge
• Data scientists are great at experimentation
• Not so much at writing high quality code
• Experimentation deep learning frameworks don’t necessarily make great
production frameworks, ex: PyTorch vs. TensorFlow
A Possible Solution: Divide Data Science and
Engineering Teams
• Write notebooks and
experimentation
models
Data Science
Team
• Refactor or rewrite
models for production
environments
• Automate training and
optimization jobs
Engineering
Team • Deploy models
• Monitor, retrain, and
optimize models
DevOps Teams
Lesson #2: Notebooks Don’t Scale …
Wait, Notebooks Do Scale Stupid
Challenge
• Notebooks are ideal for model experimentation and testing
• Notebooks typically have performance challenges when executed at
scale
• Scaling Notebook environments can be challenging
• Parametrizing Notebook executions is far from trivial
A Possible Solution: Use Containers for
Running Production Deep Learning Workloads
Model Experimentation
Jupyter, Zeppelin
Scheduling Notebooks
Papermill
Netflix’s Meson
Running Complex
Workflows
Docker Containers
Kubernetes
Lesson #3: The Single Deep Learning
Framework Fallacy…
Challenge
• Enterprises like to standardize on a single deep learning framework
• Different teams have different technology preferences
• Providing a consistent deep learning platform across different deep
learning frameworks is no easy task
A Possible Solution: Provide a Consistent
Infrastructure Across Different Deep Learning
Runtimes
Infrastructure
Data Cleansing Feature Extraction Model Training ….
Runtime
Hyperparameter
Optimization
Retraining Model Monitoring …
Model Development
TensorFlow PyTorch Caffee2 …
Lesson #4: Training is a Continuous Task…
Challenge
• The No Free Lunch Theorem
• Trained models can perform poorly against new datasets
• New engineers and DevOps need to understand how to re-train existing
models
A Possible Solution: Automate Training Jobs
DataLake
Data Outcomes/Feature
Store
Training Job1
Training Job2
Training JobN
Lesson #5: Centralized Training Doesn’t
Scale…
Challenge
• Model training can be really resource intensive
• Training jobs take a long time to execute
• Data scientists love to embed the training logic as part of the model
Notebook
A Possible Solution: Follow a Distributed Training
Architecture and Automate Training Jobs
Trained
Models
Training
Jobs
Training
Server
Training
Job
Task1 Model1
Task2 Model2
TaskN ModelN
Lesson #6: Feature Extraction Can Become a
Reusability Nightmare…
Challenge
• Different models require the same features from a dataset
• Feature extraction jobs are computationally expensive
• Different teams create proprietary ways to capture and store feature
information
A Potential Solution: Build a Centralized
Feature Store
Dataset Preparation
Job1
Dataset Preparation
Job2
Dataset Preparation
JobN
Representation
Learning Task1
Representation
Learning Task1
Representation
Learning Task1
Feature
Store
Model 1
Model N
Lesson #7: Everyone Wants a Different
Version of the Same Model…
Challenge
• Different teams might want variations of an existing model
• The same model might be trained on different sections of the original
training set
• You might end up with thousands of versions of the original model
• Even the simplest models take a long time to implement
A Possible Solution: Using AutoML and
Hierarchical Partitions on the Training Dataset
Training
Dataset
Dataset
Section 1
AutoML
Model
Version 3
Dataset
Section 2
AutoML
Model
Version 3
Dataset
Section 3
AutoML
Model
Version 3
Model
Lesson #8: Cloud Heavens, On-Premise Hell…
Challenge
• Cloud deep learning platforms are far more sophisticated that their on-
premise equivalent
• Running deep learning workloads on-premise requires a complex
infrastructure
A Possible Solution: Consider Spark or Flink as
the On-Premise Runtime
Production
Experimentation/Development
Deploy
Lesson #9: Regularization, Optimizations are a
Must…
Challenge
• Deep learning models tend to vary their performance when using
different datasets
• The cost functions of different deep learning models changes when using
different datasets
A Possible Solution: Make Regularization and
Optimization Key Elements of the Lifecycle of a
Model
Model
Development
RegularizationOptimization
Lesson #10: Different Models Require
Different Execution Patterns…
Challenge
• Not all models can be executed via APIs
• Some models take a long time to run
• In some scenarios, different models need to be executed at the same
time based on a specific condition
Possible Solution: Enable On-Demand, Scheduled
and Pub-Sub Execution of Deep Learning Models
Scheduled Activation
Model Model Model
Pub-Sub Activation
Model Model Model
On-Demand Activation
Model Model Model
Model API
Gateway
Event
Gateway
Summary
• Deep learning theory doesn't quite work in real world scenarios
• Deep learning requires a new type of architecture
• Consider combining some of the patterns described in this
presentation into a single cohesive architecture for the
implementation of deep learning solutions
Thanks
jr@invectoriq.com
https://medium.com/@jrodthoughts
https://twitter.com/jrdothoughts

More Related Content

PPTX
Implementing Machine Learning in the Real World
PPTX
No BS Guide to Deep Learning in the Enterprise
PDF
Introduction to Artificial Intelligence
PPTX
Introduction to tensorflow
PPTX
Introduction to deep learning
PPTX
An LSTM-Based Neural Network Architecture for Model Transformations
PPTX
Tutorial on Deep learning and Applications
PPTX
AI hype or reality
Implementing Machine Learning in the Real World
No BS Guide to Deep Learning in the Enterprise
Introduction to Artificial Intelligence
Introduction to tensorflow
Introduction to deep learning
An LSTM-Based Neural Network Architecture for Model Transformations
Tutorial on Deep learning and Applications
AI hype or reality

Similar to 10 Things I Wish I Dad Known Before Scaling Deep Learning Solutions (20)

PPTX
DeepLearning_01.pptx
DOCX
Title_ Deep Learning Explained_ What You Should Be Aware of in Data Science a...
PPTX
Deep_Learning_Presentation.pptx This PPT are more l
PDF
AI and Deep Learning
PPTX
Introduction-to-Deep-Learning about new technologies
PDF
End to end MLworkflows
PPTX
A simple presentation for deep learning.
PDF
Mastering Advanced Deep Learning Techniques | IABAC
PPTX
Productionizing dl from the ground up
PPTX
Deep_Learning_Demo_Class_Detailed.pptx sn
PDF
Deep Learning in a nutshell
PDF
Deep learning: Cutting through the Myths and Hype
PDF
ML crash course
PPT
Introduction_to_DEEP_LEARNING ppt 101ppt
PPTX
Deep Learning on Qubole Data Platform
PPT
Introduction_to_DEEP_LEARNING.ppt
PPT
Introduction_to_DEEP_LEARNING.sfsdafsadfsadfsdafsdppt
PPTX
Artificial Intelligence, Machine Learning and Deep Learning
PDF
"Solving Vision Tasks Using Deep Learning: An Introduction," a Presentation f...
PDF
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Deep Learning at Scale - A...
DeepLearning_01.pptx
Title_ Deep Learning Explained_ What You Should Be Aware of in Data Science a...
Deep_Learning_Presentation.pptx This PPT are more l
AI and Deep Learning
Introduction-to-Deep-Learning about new technologies
End to end MLworkflows
A simple presentation for deep learning.
Mastering Advanced Deep Learning Techniques | IABAC
Productionizing dl from the ground up
Deep_Learning_Demo_Class_Detailed.pptx sn
Deep Learning in a nutshell
Deep learning: Cutting through the Myths and Hype
ML crash course
Introduction_to_DEEP_LEARNING ppt 101ppt
Deep Learning on Qubole Data Platform
Introduction_to_DEEP_LEARNING.ppt
Introduction_to_DEEP_LEARNING.sfsdafsadfsadfsdafsdppt
Artificial Intelligence, Machine Learning and Deep Learning
"Solving Vision Tasks Using Deep Learning: An Introduction," a Presentation f...
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Deep Learning at Scale - A...
Ad

More from Jesus Rodriguez (20)

PPTX
The Emergence of DeFi Micro-Primitives
PPTX
ChatGPT, Foundation Models and Web3.pptx
PPTX
DeFi Opportunities and Challenges in the Current Crypto Market
PPTX
MEV Deep Dive .pptx
PPTX
Quant in Crypto Land
PPTX
The Polygon Blockchain by the Numbers
PPTX
Social Analytics for Cryptocurrencies
PPTX
DeFi Quant Yield-Generating Strategies
PPTX
High Frequency Trading and DeFi
PPTX
Simple DeFi Analytics Any Crypto-Investor Should Know About
PPTX
15 Minutes of DeFi Analytics
PPTX
DeFi Trading Strategies: Opportunities and Challenges
PPTX
Practical Crypto Asset Predictions rev
PPTX
Better Technical Analysis with Blockchain Indicators
PPTX
Price Predictions for Cryptocurrencies
PPTX
Fascinating Metrics and Analytics About Cryptocurrencies
PPTX
Price PRedictions for Crypto-Assets Using Deep Learning
PPTX
Demystifying Centralized Crypto Exchanges using Data Science
PPTX
Crypto assets are a data science heaven rev
PPTX
Fundamental Analysis for Crypto Assets
The Emergence of DeFi Micro-Primitives
ChatGPT, Foundation Models and Web3.pptx
DeFi Opportunities and Challenges in the Current Crypto Market
MEV Deep Dive .pptx
Quant in Crypto Land
The Polygon Blockchain by the Numbers
Social Analytics for Cryptocurrencies
DeFi Quant Yield-Generating Strategies
High Frequency Trading and DeFi
Simple DeFi Analytics Any Crypto-Investor Should Know About
15 Minutes of DeFi Analytics
DeFi Trading Strategies: Opportunities and Challenges
Practical Crypto Asset Predictions rev
Better Technical Analysis with Blockchain Indicators
Price Predictions for Cryptocurrencies
Fascinating Metrics and Analytics About Cryptocurrencies
Price PRedictions for Crypto-Assets Using Deep Learning
Demystifying Centralized Crypto Exchanges using Data Science
Crypto assets are a data science heaven rev
Fundamental Analysis for Crypto Assets
Ad

Recently uploaded (20)

PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPT
What is a Computer? Input Devices /output devices
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
observCloud-Native Containerability and monitoring.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
Tartificialntelligence_presentation.pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Architecture types and enterprise applications.pdf
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PPTX
TLE Review Electricity (Electricity).pptx
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
WOOl fibre morphology and structure.pdf for textiles
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
DP Operators-handbook-extract for the Mautical Institute
PPTX
OMC Textile Division Presentation 2021.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
What is a Computer? Input Devices /output devices
Univ-Connecticut-ChatGPT-Presentaion.pdf
observCloud-Native Containerability and monitoring.pptx
Programs and apps: productivity, graphics, security and other tools
Final SEM Unit 1 for mit wpu at pune .pptx
Hindi spoken digit analysis for native and non-native speakers
Tartificialntelligence_presentation.pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Architecture types and enterprise applications.pdf
Module 1.ppt Iot fundamentals and Architecture
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
TLE Review Electricity (Electricity).pptx
Web App vs Mobile App What Should You Build First.pdf
WOOl fibre morphology and structure.pdf for textiles
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Zenith AI: Advanced Artificial Intelligence
DP Operators-handbook-extract for the Mautical Institute
OMC Textile Division Presentation 2021.pptx

10 Things I Wish I Dad Known Before Scaling Deep Learning Solutions

  • 1. 10 Things I Wish I Had Known Before Scaling Deep Learning Solutions Invector Labs
  • 2. About Invector Labs • Platform for top-class computer science talent • Uses artificial intelligence to connect enterprises with top freelance talent around the world • Focused on deep tech • Artificial intelligence • Blockchain technologies • Internet of things • Cybersecurity • Advanced cloud computing • …. • http://invectorlabs.com
  • 3. Agenda • Realities of scaling deep learning solutions • 10 Lessons • Challenge • What we learned? • Solution
  • 4. Lessons from the Real World •Using deep learning to analyze reviews form over 40 travel websites •12 different deep learning models •Scenarios: topic extraction, sentiment analysis, price predictions, hotel scoring…. •Techniques: Natural language processing, NLP micro understanding, clustering, time series analysis Large Hospitality Group •Using deep learning to extract intelligence from trial discovery documents and legal research •8 different deep learning models •Scenarios: Natural language search, knowledge extraction, document relationships, research recommendations, strategy simulation •Techniques: Convolutional neural networks, generative models, recurrent neural networks, natural language processing…. Legal Software Platform Vendor •Using deep learning to analyze cargo information and sensor data •18 different deep learning models •Scenarios: Car load predictions, part maintenance prediction, track video analysis •Techniques: Convolutional neural networks, recurrent neural networks, transfer learning, predictive modeling, linear regressions…. International Railway Company •Using deep learning to simulate trading strategies •11 different deep learning models •Scenarios: Portfolio rebalancing, option pricing, daily stock selection, strategy selection •Techniques: Reinforcement learning, transfer learning, predictive modeling Quant Hedge Fund
  • 5. Key Takeaways • Implementing deep solutions at scale imposes new infrastructure challenges • Deep learning requires a new type of architecture
  • 7. Deep Learning • Deep learning is a subset of machine learning. • Uses a hierarchy of multiple layers of nonlinear processing units for feature extraction and transformation. Each successive layer uses the output from the previous layer as input. • Learns in supervised (e.g., classification) and/or unsupervised (e.g., pattern analysis) manners. • Learns multiple levels of representations that correspond to different levels of abstraction; the levels form a hierarchy of concepts.
  • 9. What Makes Deep Learning so Challenging? Curse of Dimensionality • Models with millions of nodes Over/Under Fitting • Models too tailored to the datasets Interpretability • Understanding complex network structures Bias/Variance • Preconceptions included in the datasets
  • 10. Implementing Deep Learning in the Enterprise is Brutally Hard
  • 11. But not just because of the obvious reasons…
  • 12. 10 painful, non-trivial lessons we learned while building deep learning solutions at scale…
  • 13. Lesson #1: Data Scientists Make Horrible Engineers…
  • 14. Challenge • Data scientists are great at experimentation • Not so much at writing high quality code • Experimentation deep learning frameworks don’t necessarily make great production frameworks, ex: PyTorch vs. TensorFlow
  • 15. A Possible Solution: Divide Data Science and Engineering Teams • Write notebooks and experimentation models Data Science Team • Refactor or rewrite models for production environments • Automate training and optimization jobs Engineering Team • Deploy models • Monitor, retrain, and optimize models DevOps Teams
  • 16. Lesson #2: Notebooks Don’t Scale … Wait, Notebooks Do Scale Stupid
  • 17. Challenge • Notebooks are ideal for model experimentation and testing • Notebooks typically have performance challenges when executed at scale • Scaling Notebook environments can be challenging • Parametrizing Notebook executions is far from trivial
  • 18. A Possible Solution: Use Containers for Running Production Deep Learning Workloads Model Experimentation Jupyter, Zeppelin Scheduling Notebooks Papermill Netflix’s Meson Running Complex Workflows Docker Containers Kubernetes
  • 19. Lesson #3: The Single Deep Learning Framework Fallacy…
  • 20. Challenge • Enterprises like to standardize on a single deep learning framework • Different teams have different technology preferences • Providing a consistent deep learning platform across different deep learning frameworks is no easy task
  • 21. A Possible Solution: Provide a Consistent Infrastructure Across Different Deep Learning Runtimes Infrastructure Data Cleansing Feature Extraction Model Training …. Runtime Hyperparameter Optimization Retraining Model Monitoring … Model Development TensorFlow PyTorch Caffee2 …
  • 22. Lesson #4: Training is a Continuous Task…
  • 23. Challenge • The No Free Lunch Theorem • Trained models can perform poorly against new datasets • New engineers and DevOps need to understand how to re-train existing models
  • 24. A Possible Solution: Automate Training Jobs DataLake Data Outcomes/Feature Store Training Job1 Training Job2 Training JobN
  • 25. Lesson #5: Centralized Training Doesn’t Scale…
  • 26. Challenge • Model training can be really resource intensive • Training jobs take a long time to execute • Data scientists love to embed the training logic as part of the model Notebook
  • 27. A Possible Solution: Follow a Distributed Training Architecture and Automate Training Jobs Trained Models Training Jobs Training Server Training Job Task1 Model1 Task2 Model2 TaskN ModelN
  • 28. Lesson #6: Feature Extraction Can Become a Reusability Nightmare…
  • 29. Challenge • Different models require the same features from a dataset • Feature extraction jobs are computationally expensive • Different teams create proprietary ways to capture and store feature information
  • 30. A Potential Solution: Build a Centralized Feature Store Dataset Preparation Job1 Dataset Preparation Job2 Dataset Preparation JobN Representation Learning Task1 Representation Learning Task1 Representation Learning Task1 Feature Store Model 1 Model N
  • 31. Lesson #7: Everyone Wants a Different Version of the Same Model…
  • 32. Challenge • Different teams might want variations of an existing model • The same model might be trained on different sections of the original training set • You might end up with thousands of versions of the original model • Even the simplest models take a long time to implement
  • 33. A Possible Solution: Using AutoML and Hierarchical Partitions on the Training Dataset Training Dataset Dataset Section 1 AutoML Model Version 3 Dataset Section 2 AutoML Model Version 3 Dataset Section 3 AutoML Model Version 3 Model
  • 34. Lesson #8: Cloud Heavens, On-Premise Hell…
  • 35. Challenge • Cloud deep learning platforms are far more sophisticated that their on- premise equivalent • Running deep learning workloads on-premise requires a complex infrastructure
  • 36. A Possible Solution: Consider Spark or Flink as the On-Premise Runtime Production Experimentation/Development Deploy
  • 37. Lesson #9: Regularization, Optimizations are a Must…
  • 38. Challenge • Deep learning models tend to vary their performance when using different datasets • The cost functions of different deep learning models changes when using different datasets
  • 39. A Possible Solution: Make Regularization and Optimization Key Elements of the Lifecycle of a Model Model Development RegularizationOptimization
  • 40. Lesson #10: Different Models Require Different Execution Patterns…
  • 41. Challenge • Not all models can be executed via APIs • Some models take a long time to run • In some scenarios, different models need to be executed at the same time based on a specific condition
  • 42. Possible Solution: Enable On-Demand, Scheduled and Pub-Sub Execution of Deep Learning Models Scheduled Activation Model Model Model Pub-Sub Activation Model Model Model On-Demand Activation Model Model Model Model API Gateway Event Gateway
  • 43. Summary • Deep learning theory doesn't quite work in real world scenarios • Deep learning requires a new type of architecture • Consider combining some of the patterns described in this presentation into a single cohesive architecture for the implementation of deep learning solutions