tensorflow / recommenders

TensorFlow Recommenders is a library for building recommender system models using TensorFlow.
Apache License 2.0
1.82k stars 273 forks source link

Getting recommendations for a new user #200

Open msvensson222 opened 3 years ago

msvensson222 commented 3 years ago

In the example of producing movie recommendations for a set of users, given that we are interested in making online-predictions, I would assume that re-training of the model would take place maybe once per day or once per week.

Pose that a new, previously unknown user, watches a movie Friday night before we re-train the model the next day. How would we go about to recommend movies to this user late Friday night when he/she might want to watch another one? The user is currently not in our model, but we know which movie he/she watched. One solution would be to query the model for the user, and return a out-of-vocabulary recommendations for the user, although, these recommendations would not take into consideration the movie the user just watched.

Is there a way to find similar users to the one in question, and base the recommendations on these similar users somehow? I could see how we could get the user embeddings for all users, as well as the movie embeddings for all movies, and dot-multiply those matrices to get a user/movie matrix, which we then could somehow (unknown to me) get similar users.

Any ideas how to use this kind of recommendation model when dealing with unknown users at serving-time?

maciejkula commented 3 years ago

The usual approach here is to make your model take user features as input. For example, you'd make the sequence of movies a user watched in the past an input into your user model. That way, every time the user watches a new movie, their representation is updated, and we can generate new recommendations.

The GRU4Rec paper is a standard reference here.

See https://github.com/tensorflow/recommenders/issues/119 for some more discussion.

juliobguedes commented 3 years ago

Pose that a new, previously unknown user, watches a movie Friday night before we re-train the model the next day. How would we go about to recommend movies to this user late Friday night when he/she might want to watch another one? The user is currently not in our model, but we know which movie he/she watched. One solution would be to query the model for the user, and return a out-of-vocabulary recommendations for the user, although, these recommendations would not take into consideration the movie the user just watched.

Not necessarily. As @maciejkula said, GRU4Rec is a reference because is a starting paper in the topic of Sequential Recommendation, which improves the performance to unidentified (YouTube, for instance, does not require a login to see videos, but recommends anyway) and new users.

Before the first movie is watched, many systems ask the users to input a number of movies that they watched and liked, and this builds an initial user history. While this does not happen frequently in the academy, it is a solution implemented by the industry to aid the models.

Is there a way to find similar users to the one in question, and base the recommendations on these similar users somehow? I could see how we could get the user embeddings for all users, as well as the movie embeddings for all movies, and dot-multiply those matrices to get a user/movie matrix, which we then could somehow (unknown to me) get similar users.

Considering that you said that the model might be trained again when the user has watched a single movie, any Recommender System should be able to provide items that the user might like. However, highlighting your interest to find similar users to the one in question, you should try using models like UserKNN and ItemKNN, which were proposed many years ago but still perform better than many Deep Learning models (refer to Are We Really Making Much Progress?) and are frequently used in the industry.