Context Matters: Why Aren’t You Leveraging Items’ Context to Boost Your Recommender Model?
Data sparsity is one of the biggest challenges in recommender systems. A promising solution to alleviate this problem is to rely on auxiliary sources of information. In fact, plenty of studies have established empirically that leveraging information such as users’ social network or item contents (e.g., textual descriptions) often improves recommendations. In this post we will go through a key source of information, namely item-to-item relationships, which can drastically boost recommender models but has been overlooked by most previous work.
Here are two insights relevant for this post:
- We rarely consume items, e.g., pair of jeans, with identical or very similar features to those we have already experienced.
- We tend to consume items which can complement each other, e.g., shirt and matching pair of jeans, or which are alternatives to each other with some different features, e.g., two shirts of the same style but different colors, etc.
Hence, knowing how items relate to one another could allow us to generalize a user’s preference to other items of similar aspects, which would alleviate the sparsity issue. Before getting into the main point of this post, namely leveraging item-to-item relationships in personalized recommendation, we need to answer a couple of questions. The first one is, how do we capture or where can we find such item-to-item connections?
Online applications often maintain information that may hold useful clue about how items are related to one another. For instance, videos sharing platforms, such as Youtube, maintain play-lists which usually consist of videos sharing a coherent theme, e.g., country music of the 90s. E-commerce websites, such as Amazon, record data about which items are browsed in the same session, e.g., Also-Viewed items, which often correspond to complementary products or alternatives meeting a particular need.
To unify the above scenarios, we introduce the notion of “context”, which may for example refer to a shopping cart, browsing session, playlist, etc., depending on the specific problem instance. The intuition is that items sharing similar contexts are likely related to one another in terms of some aspect that guides the choices one makes.
Equipped with items’ context, we are now left with the second research question, which is how to infuse a recommender model with this information?
Infusing recommendation with item context
There are several ways you can incorporate item context into personalized recommendation . In Preferred.AI, we proposed one principled solution to this problem, namely Collaborative Context Poisson Factorization (C2PF). The latter is a Bayesian latent factor model assuming that user preferences can be driven by two signals: user-item interactions and item-item contextual relationships, as illustrated in the following figure.
Impact of items’ context on recommendation
To empirically assess the impact of item context on personalized recommendation, we benchmark C2PF with Bayesian Poisson Factorization (PF)—corresponding to C2PF without items’ context. We consider the Amazon Clothing dataset, which comes with the Also-Viewed lists treated as items’ context in our case. We measure the recommendation accuracy using Normalized Discount Cumulative Gain (NDCG), Mean Reciprocal Rank (MRR), Precision, and Recall.
As it is clear from the above table the performance improvement of C2PF over PF is substantial and quite impressive. Interestingly, a closer look at the above results, see C2PF paper, reveals that C2PF offers the most improvement on users with few ratings, suggesting that item context helps in generalizing users’ preferences to other items of similar aspect.
As motivated and demonstrated empirically through the current post, contextual relationships among items may underlie useful signals about how users consume items. While our work on C2PF constitutes an important contribution in terms of how we can formalize, capture and incorporate item relatedness into personalized recommendation, there is still much more to do before we fully leverage this aspect. Here are few relevant directions for future work.
- Jointly leverage items’ contextual relationships and users’ social network. In particular C2PF can be extended in this sense. Perhaps one difficulty is to find datasets coming both with a social network and some notion of item context.
- Capture item relations from multiple contexts. For instance in Amazon data there are various sources of information that can encode item relationships, e.g., item bought together, browsed together, etc.
- Exploit item context along with other item related data, e.g., textual descriptions, reviews, etc.
- C2PF paper: A Bayesian Latent Variable Model of User Preferences with Item Context. IJCAI 2018.
- C2PF implementation: available in Cornac a python recommender system library.