Easily understand Factorization Machine in 5 minutes

Yoshi
FAUN — Developer Community 🐾
3 min readJun 14, 2022

--

Introduction

Factorization Machine is one of the most important methods to predict the click-through rate in building the recommendation system.

Given the data of user rating to the item and auxiliary feature, we can then predict the rating of user give to the other items.

Principle

Data Form

The x represents each of the row data and has its corresponding target rate y.

Each row data contains different types of feature information.

The blue box represents for the one-hot vector of user-id, orange represents for the one-hot vector of item-id, and the remains can view as the auxiliary features.

Model Equation

Xi means the value contains in the vector.

Wi means its corresponding weight.

y is the rating which predicted by the model.

Vi is the embedding vector of the Xi.

The intuitive way to understand the physical meaning behind the model equation is factorization machine embed each of the input features into a vector space and intersecting compute the inner product of each pair of embedding features(latent factor).

By doing this operation the model can learn the way to predict the rating by correlation of each feature and also feature itself with its weighting.

Why Factorization Machine

The other way to build the recommendation system by user-id with the item-id to the rating is Factorized Matrix with ALS(Alternating least squares), which is useful if we want to implement the collaborative filter and ranking-base filter.

However, there’s a problem called “cold-start” while we only train the model only with the user rating, and the solution is to add the auxiliary feature to the training data.

Factorized Machine can take the additional feature into consideration to formulate the latent factor. If we know with feature the new item we want to add, we can improve the cold-start problem to some extent.

With the factorization machine, we have a more generic way to deal with that kind of problem, we can also view Factorized Matrix as a subset of Factorized Machine, and we can apply a higher level of interaction if we want more complexity to our model.

ref: https://www.csie.ntu.edu.tw/~b97053/paper/Rendle2010FM.pdf

If this post was helpful, please click the clap 👏 button below a few times to show your support for the author 👇

🚀Developers: Learn and grow by keeping up with what matters, JOIN FAUN.

--

--