Building Neural Collaborative Filtering recommendation model
Key Takeaways
The video demonstrates building a Neural Collaborative Filtering (NMF) recommendation model using TensorFlow, specifically utilizing TensorFlow Model Garden for reference implementations and building a Neural Matrix Factorization (NeuMF) model in TensorFlow 2.
Full Transcript
hi there welcome back to our video series of building recommendation systems with sensor flow my name is way and I'm a developer Advocate at Google in this video we'll be discussing a recommendation model neuro collaborative filing and showing you how to build such a model using tensorflow to core API we have covered a lot of ground in this video series but mostly the tools we discussed are high level apis which are made easy to use on purpose but there are some occasions when you really want to go below the surface and use a centerflow core apis to build a recommendation engine from scratch this sometimes makes sense and we're going to show you how today we're going to build a classical recommendation model called neurometrix factorization new MF new MF comes out of the 2017 research paper by H and his collaborators and it is an instantiation of neur collaborative FY it is a general framework for collaborative furthering of recommendations in which a neuron Network architecture is used to model user item interactions unlike traditional models umf does not resort to Matrix factorization with an inner product on latent features of users and items it replaces the inner product with a multi-layer pectrum that can learn an operatory function from data architecture wise new umf is an ensemble of generalized Matrix factorization gmf and multi-layer perception MLP gmf applies a linear kernel to model the lat feature interaction and MLP applies a nonlinear kernel to learn the interaction function from data new MF is a fused model of gmf and MLP to better model the complex user item interactions and unifies the strength of of linearity of MF and nonlinearity of MLP for modeling the user item latent structures new MF allows gmf and MLP to learn separate embeddings and combines the two models by concatenating their last hidden layers specifically starting at the bottom we have using embedding and moving embeddings from this embeddings we generate user and movie latent Vector for Matrix factorization and MLP layer separately after passing through the generalized Matrix factorization layer and MLP layer we concatenate the outputs of this layers and get the predicted Logics from a dense layer for computing the loss that's it that's the whole architecture we actually provide an excellent implementation of new MF in the tensor FL motor Garden for context tensorflow model Garden is a repository for reference model implementations for 4 2 and it includes more than 50 state-of-the-art models across Vision NP and recommendation engines torfl Motel Garden in a was taking full advantage of torl 2 for research and production it is a community-driven repository with growing contributions and it's a top 10 python package with most unique contributors in 2020 teslow Mel Garden has an implementation of this architecture let's walk through the code to understand how to build it with tlow to first we start with user and item input layers this is quite straightforward next we call Constructor model method to generate the logic by passing the user and item inputs we're going to Define Constructor model function next in Constructor model function we Define the user and item embeddings using the user and item inputs note the embedding Dimension we set as the second parameter this embeddings will be shared by both the Matrix factorization layer and MLP layers and we will extract user and item latent vectors from this embeddings next we're going to use several Lambda layers to slice the embeddings into user and item latent vectors to do the slicing we Define two utility functions MF slice Funk and MLP slice Funk functions as you can see the Matrix factorization lat vectors takes the first two mfdm elements from the embedding while the MLP lat vectors takes the remaining embeddings next for generalized Matrix factorization we're going to use the multiply layer to do element wise multiplication for MLP we're going to first concatenate the user and item latest vectors into a MLP vector and then pass it through several MLP layers lastly we concatenate The Matrix factorization vector and the MLP Vector into a single Vector predictive Vector here and generates the logic FR it using a des layer then we return the model finally we can compute the cross entropy loss from the predicted soft Max loges converted from the predicted loges so that's it that's all the code to build the newer collaborative feding model of course this is just the modeling part you still need to write code to handle data preprocessing model training performance evaluation and so on but hopefully the code walk through here helps you understand how to build a good neur collaborative feding model so to summarize today we walked us through how to build a neuro collaborative fed model with tensor 2 API you can check out the original research paper and the code in tensor modor Garden for additional details with that thank you for watching this video please stay tuned for more updates from us [Music] [Music]
Original Description
Wei Wei, a Developer Advocate, overviews how to build a Neural Collaborative Filtering (NMF) recommendation model. Learn how to build a recommendation engine from scratch with a code walkthrough utilizing TensorFlow Model Garden to reference model implementations for building a Neural Matrix Factorization (NeuMF) recommendation model in TensorFlow 2.
Resources:
Neural Collaborative Filtering implementation in TensorFlow Model Garden → https://goo.gle/3jAMaqf
Neural Collaborative Filtering research paper → https://goo.gle/3Z89Wdp
TensorFlow Model Garden → https://goo.gle/3WJcE7F
Watch more Coding TensorFlow → https://goo.gle/3Bi8NUS
Subscribe to TensorFlow → https://goo.gle/TensorFlow
Products mentioned: TensorFlow - TensorFlow Recommenders
Speakers: Wei Wei
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from TensorFlow · TensorFlow · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
The TensorFlow YouTube Channel is Here!
TensorFlow
Answering Your TF Questions #AskTensorFlow
TensorFlow
Chatting With the TensorFlow Community (TensorFlow Meets)
TensorFlow
All About TensorFlow Code (Coding TensorFlow)
TensorFlow
TensorFlow: an ML platform for solving impactful and challenging problems
TensorFlow
Keynote (TensorFlow Dev Summit 2018)
TensorFlow
tf.data: Fast, flexible, and easy-to-use input pipelines (TensorFlow Dev Summit 2018)
TensorFlow
Eager Execution (TensorFlow Dev Summit 2018)
TensorFlow
Machine Learning in JavaScript (TensorFlow Dev Summit 2018)
TensorFlow
Training Performance: A user’s guide to converge faster (TensorFlow Dev Summit 2018)
TensorFlow
The Practitioner's Guide with TF High Level APIs (TensorFlow Dev Summit 2018)
TensorFlow
Distributed TensorFlow (TensorFlow Dev Summit 2018)
TensorFlow
Debugging TensorFlow with TensorBoard plugins (TensorFlow Dev Summit 2018)
TensorFlow
TensorFlow Lite (TensorFlow Dev Summit 2018)
TensorFlow
Searching Over Ideas (TensorFlow Dev Summit 2018)
TensorFlow
Reconstructing Fusion Plasmas (TensorFlow Dev Summit 2018)
TensorFlow
Nucleus: TensorFlow toolkit for Genomics (TensorFlow Dev Summit 2018)
TensorFlow
Open Source Collaboration (TensorFlow Dev Summit 2018)
TensorFlow
Swift for TensorFlow - TFiwS (TensorFlow Dev Summit 2018)
TensorFlow
TensorFlow Hub (TensorFlow Dev Summit 2018)
TensorFlow
Applied AI at The Coca-Cola Company (TensorFlow Dev Summit 2018)
TensorFlow
Real-World Robot Learning (TensorFlow Dev Summit 2018)
TensorFlow
TensorFlow Extended (TFX) (TensorFlow Dev Summit 2018)
TensorFlow
Project Magenta (TensorFlow Dev Summit 2018)
TensorFlow
TensorFlow Dev Summit 2018 - Livestream
TensorFlow
Introducing TensorFlow Lite (Coding TensorFlow)
TensorFlow
TensorFlow Dev Summit 2018 Highlights
TensorFlow
Jeff Dean, Head of AI at Google discusses the impact of ML (TensorFlow Meets)
TensorFlow
TensorFlow Mobile vs. TF Lite and More! #AskTensorFlow
TensorFlow
Using TensorFlow to enable research & production across many fields (TensorFlow Meets)
TensorFlow
Teaching TensorFlow for Deep Learning at Stanford University (TensorFlow Meets)
TensorFlow
TensorFlow Lite for Android (Coding TensorFlow)
TensorFlow
Using the tf.data API to build input pipelines (TensorFlow Meets)
TensorFlow
Training Models in the Cloud & the Benefits of AI Toolkits #AskTensorFlow
TensorFlow
Execute operations immediately with TensorFlow's Eager Execution (TensorFlow Meets)
TensorFlow
TensorFlow Lite for iOS (Coding TensorFlow)
TensorFlow
Get started with TensorFlow's High-Level APIs (Google I/O '18)
TensorFlow
TensorFlow for JavaScript (Google I/O '18)
TensorFlow
TensorFlow in production: TF Extended, TF Hub, and TF Serving (Google I/O '18)
TensorFlow
Get started with TensorFlow's High-Level APIs in 5 mins | Google I/O 2018
TensorFlow
TensorFlow and deep reinforcement learning, without a PhD (Google I/O '18)
TensorFlow
TensorFlow Lite for mobile developers (Google I/O '18)
TensorFlow
Advances in machine learning and TensorFlow (Google I/O '18)
TensorFlow
Distributed TensorFlow training (Google I/O '18)
TensorFlow
Classification using neural networks & ML regression models #AskTensorFlow
TensorFlow
TensorFlow and Keras in R - Josh Gordon meets with J.J. Allaire (TensorFlow Meets)
TensorFlow
Focus on your experiment with TensorFlow Estimators (TensorFlow Meets)
TensorFlow
How to get started with AI/ML, retraining models, & more! #AskTensorFlow
TensorFlow
TensorFlow - the deep learning solution for mobile platforms (TensorFlow Meets)
TensorFlow
MiniGo: TensorFlow Meets Andrew Jackson (TensorFlow Meets)
TensorFlow
The growth of TensorFlow with added support for JS & Swift (TensorFlow Meets)
TensorFlow
At the intersection of TensorFlow & nuclear physics (TensorFlow Meets)
TensorFlow
NVidia TensorRT: high-performance deep learning inference accelerator (TensorFlow Meets)
TensorFlow
Try TensorFlow.js in your browser (Coding TensorFlow)
TensorFlow
TensorFlow Hub: reusing machine learning modules (TensorFlow Meets)
TensorFlow
How to use TensorFlow in PyCharm (TensorFlow Tip of the Week)
TensorFlow
Training models faster with TensorFlow Hub (TensorFlow Meets)
TensorFlow
Prepare your dataset for machine learning (Coding TensorFlow)
TensorFlow
Using ML to predict insulin use for Type 1 Diabetes (TensorFlow Meets)
TensorFlow
TFX: an end-to-end machine learning platform for TensorFlow (TensorFlow Meets)
TensorFlow
Related Reads
📰
📰
📰
📰
A lightweight workflow for keeping up with AI conference papers
Dev.to · Daniel
Why CitedEvidence Believes Great Researchers Read Less Than You Think
Medium · AI
How to Write a Literature Review That Actually Argues Something
Medium · Machine Learning
I Built a Personal Paper Engine to Stop Losing Research Papers
Dev.to · Ethan
🎓
Tutor Explanation
DeepCamp AI