Mar 15–18, 2020

Deep learning for recommendation systems (Day 2)

Bargava Subramanian (Binaize), Amit Kapoor (narrativeVIZ)
Location: 112



“Sure. I do marathons…on Netflix.”

In the digital world, recommendation systems play a significant role for the users and the company. For the users, a new world of options is thrown up that were hitherto tough to find. For companies, it helps drive user engagement and satisfaction, directly impacting their bottom line. If you’ve shopped on an ecommerce site or watched a movie on an on-demand video platform, you’ve seen options like “People who viewed this product also viewed…” or “Products similar to this one…” These are the results of recommendation systems.

Bargava Subramanian and Amit Kapoor provide an overview of the different paradigms of recommendation systems and an introduction to the usage of machine learning- and deep learning-based approaches using 70% programming and coding and 30% theory. Along the way, you’ll gain enough practical hands-on knowledge to build, select, deploy, and maintain a recommendation system for your problem.


Key concepts

  • Theory: ML and DL formulation, prediction versus ranking, similarity
  • Paradigms: Content-based, collaborative filtering, hybrid, and ensembles
  • Data: Tabular, images, text (sequences)
  • Models: (Deep) matrix factorization, wide and deep, rank learning, sequence modeling
  • Methods: Explicit versus implicit feedback, user-item matrix, embeddings, convolution, recurrent, domain signals—time, context
  • Process: Set up, encode and embed, design, train and select, serve and scale, measure, test, and improve
  • Tools: python-data-stack—NumPy, pandas, scikit-learn, TensorFlow, TF-Ranking, implicit, spaCy

Introduction to recommendation systems

  • Why build recommendation systems?: Scope and evolution of RecSys, prediction and ranking, relevance, novelty, serendipity, and diversity
  • Paradigms in recommendations: Content-based, collaborative filtering, knowledge-based, hybrid and ensembles
  • Key concepts in RecSys: Explicit versus implicit feedback, user-item matrix, domain signals—location, time, context, social
  • Why use deep learning for RecSys?: Primer on deep learning, traditional versus deep learning approaches, examples, and use cases

Introduction to deep learning

  • Environment set up for hands-on session
  • Primer on deep learning: Model architectures, activation functions, learning, gradient descent
  • Exercise: Deep learning model to learn function approximation

Collaborative filtering (CF)

  • Introduction to the case: Movie recommendation
  • Primer on collaborative filtering for RecSys: Traditional versus deep learning approaches, user and item embedding
  • Exercise: Baseline model
  • Exercise: Matrix factorization using deep learning from scratch

Deeper CF models and offline model evaluation

  • Deeper architectures for collaborative filtering: Deep matrix factorization, neural collaborative filtering
  • Handling bias: User and item bias
  • Offline evaluation metrics: Precision @k, recall @k
  • Exercise: Deep matrix factorization
  • Exercise: Neural collaborative filtering
  • Exercise: Model with bias
  • Exercise: Model evaluation

Deep learning models to extract features

  • Overview of side features (metadata and unstructured data)
  • Extracting features from images: Primer on convolutional neural network (CNN)
  • Introduction to transfer learning
  • Extracting features from text: Primer on long short-term memory (LSTM), Word2Vec
  • Exercise: Create features from images using CNN
  • Exercise: Create features from text using Word2Vec

Hybrid models

  • Combine content-based and collaborative filtering
  • Primer on wide and deep learning for recommender systems
  • Exercise: Similar items using images and/or text features
  • Exercise: Recommending items using wide and deep learning model


  • Why learning to rank? Prediction versus ranking
  • Rank learning approaches: Pointwise, pairwise, and listwise
  • Deep learning approach to combine prediction and ranking
  • Evaluation metrics for ranking: NDCG, MAP @ k
  • Exercise: Recommending items using learning to rank

Deployment, monitoring, evaluation, challenges, and way forward

  • Architectures for recommendation systems models: Offline, nearline, and online
  • Testing for recommendation systems: A/B testing, multiarm bandit
  • Challenges in RecSys: Building explanations, model debugging, scaling out and up, fairness, accountability, and trust
  • Bias in recsys: Training data, UI → Algorithm → UI, private
  • When not to use deep learning for RecSys
  • Recap and next steps, learning resources

Prerequisite knowledge

  • A working knowledge of programming
  • Familiarity with Python and its data stack (NumPy, pandas)
  • General knowledge of machine learning principles and machine learning problems (e.g., classification)
  • A basic understanding of standard machine learning evaluation (e.g., train/test, confusion matrix)
  • Familiarity with Jupyter notebooks (useful but not required)
  • A basic understanding of linear algebra (useful but not required)

Background material for Python, Python data stack, and machine learning:

What you'll learn

  • Get a thorough introduction to recommendation systems and paradigms across domains
  • Gain an end-to-end view of machine learning- and deep learning-based recommendation and learning-to-rank systems
  • Understand practical considerations and guidelines for building and deploying recommendation systems for your own problems
Photo of Bargava Subramanian

Bargava Subramanian


Bargava Subramanian is a cofounder and deep learning engineer at Binaize in Bangalore, India. He has 15 years’ experience delivering business analytics and machine learning solutions to B2B companies, and he mentors organizations in their data science journey. He holds a master’s degree from the University of Maryland, College Park. He’s an ardent NBA fan.

Photo of Amit Kapoor

Amit Kapoor


Amit Kapoor is a data storyteller at narrativeViz, where he uses storytelling and data visualization as tools for improving communication, persuasion, and leadership through workshops and trainings conducted for corporations, nonprofits, colleges, and individuals. Interested in learning and teaching the craft of telling visual stories with data, Amit also teaches storytelling with data for executive courses as a guest faculty member at IIM Bangalore and IIM Ahmedabad. Amit’s background is in strategy consulting, using data-driven stories to drive change across organizations and businesses. Previously, he gained more than 12 years of management consulting experience with A.T. Kearney in India, Booz & Company in Europe, and startups in Bangalore. Amit holds a BTech in mechanical engineering from IIT, Delhi, and a PGDM (MBA) from IIM, Ahmedabad.

Leave a Comment or Question

Help us make this conference the best it can be for you. Have questions you'd like this speaker to address? Suggestions for issues that deserve extra attention? Feedback that you'd like to share with the speaker and other attendees?

Join the conversation here (requires login)

Contact us

For conference registration information and customer service

For more information on community discounts and trade opportunities with O’Reilly conferences

Become a sponsor

For information on exhibiting or sponsoring a conference

For media/analyst press inquires