The last decades have seen an enormous technological evolution, allowing companies to improve their content quality and availability in a personalized manner. Services like Facebook, YouTube, Amazon, Netflix, and Tinder, among others, are examples of services that have incorporated content recommendation mechanisms, depending on the business to which they belong, according to certain characteristics of their users. Such systems are known as recommendation systems and are present in people’s daily lives.
Recommendation systems
Recommender systems aim to suggest the most relevant items for each user, i.e., items that are more likely to be approved. With this, users not only save time by avoiding searching for the most desired items but there is also the likelihood of items being recommended that they would never see. In some industries, recommendation systems are key to user retention, especially for those who do not have a lot of time or patience to search for the desired item in a huge list of potential items. These recommendations are usually based on each user’s preferences, so there is unique personalization tailored to each user. Therefore, a good recommendation system allows recommending items with a high probability of being accepted by users, thus increasing their level of satisfaction and the possibility of improving the quality of the service in question.
There are several approaches for the development of recommendation systems, depending on the objective for which it is proposed, the main ones being Content-based filtering, Collaborative filtering, and Hybrid filtering. Collaborative filtering is divided into two categories: Model-based filtering and Memory-based filtering, the latter is also divided into two categories: User-based collaborative filtering and Item-based collaborative filtering.
Fig.1 : Main approaches of the recommendation systems [1]
Content-based filtering
Content-based filtering is based on the similarity of items present in the history of interactions between users and different items, i.e. items are recommended that are similar to items that a particular user has had interaction with.
Fig.2 : Illustration of Content-based filtering [2]
Two types of data are used: the user vector being represented by the users’ characteristics, vector A, and the item vector being represented by the items’ characteristics, vector B. Recommendations are computed using cosine similarity.
Fig.3 : Computation of the cosine similarity [1]
After these computations, the values of the cosine similarity matrix are sorted in descending order, with recommendations given by the items at the top, i.e. the items most similar to the history items.
Advantages:
- The user receives recommendations on the types of items they want most;
- The user is satisfied with the type of recommendations;
- New items can be recommended, with only features being required for that item.
Disadvantages:
- The user will never be recommended for different items;
- The business cannot be expanded, because the user does not try a different type of item;
- If the user matrix or item matrix is changed, the cosine similarity matrix needs to be calculated again.
Collaborative filtering
Collaborative filtering is based on the preferences of similar users, i.e. if similar users had interactions with the same items, then the items that one of these users interacted with but not the other user are recommended.
Fig.4 : Illustration of Collaborative filtering [2]
Advantages:
- New items can be recommended to the user;
- The business can be expanded and new items can be popularized.
Disadvantages:
- The new item cannot be recommended later if no user has interacted with it, i.e. one has not accepted this new item as a recommendation.
Hybrid filtering
As the name suggests, Hybrid filtering combines different approaches such as Content-based filtering and Collaborative filtering to improve performance and mitigate the limitations of these approaches.
Reciprocal recommendation systems
Reciprocal recommendation systems are used to recommend users to other users rather than items to users, where both users must reciprocate, i.e. both must be satisfied with the suggested recommendation. In practice, bidirectional/reciprocal preference scores are calculated across users.
Fig.5 : Preferences between user x and user y [3]
Fig.6 : General conceptual model of reciprocal recommendation systems [3]
There are several differences between recommendation systems and reciprocal recommendation systems, as described in Table 1.
Table1 : Some differences between recommendation systems and reciprocal recommendation systems [3]
Reciprocal recommendation systems are developed to be exclusively aimed at people, and therefore there may be only a single class or two classes of users.
Single class:
- Homogeneous set of users U;
- Any two users in U can be recommended to each other;
- Applications: symmetric social networks, student correspondence, homosexual dating, sharing economy, among others.
Two classes:
- U is subdivided into two subsets of users or classes, for example, U = M ∪ F;
- Given x ∈ M, only users of the other class can be recommended, y ∈ F;
- Applications: heterosexual dating, recruitment, student-teacher correspondence, among others.
RECON
REciprocal CONtent-based recommender (RECON) [4] is a content-based reciprocal recommender, initially developed for online dating, but which can be adjusted for other tasks according to the business. The goal of this model is to create a top-N of recommendations based on users’ profiles and preferences.
Initially, only the profiles are available, being necessary to infer the preferences of each user through its history of interactions with other users, thus using the features present in the profiles. For example, if a given user has had interactions with five female users and one interaction with a male user, the feature in the preferences for the female gender will have 5 as its value and the feature in the preferences for the male gender will have 1 as its value.
Fig.7 : Example of the distribution of features from the interaction history of a given user
Mathematically, Ux = {Vx,a: ∀a ∈ A} is the profile of user x, with A being a finite set of attributes, e.g. the user’s gender, and the value of the attribute a ∈ A for user x, e.g. female gender. The preferences are then inferred using statistical methods. Let m be the number of times the preference of user x for a user y with the attribute value Vy,a on attribute a. The preferences Px,a of user x for different values of an attribute a, V(a), are given by the following distribution:
Px,a = {(v, m): ∀ valores únicos v ∈ V(a)}
In the case of a new user, i.e. a user who has no history of interactions, it is necessary to use differentiated approaches to infer their preferences. A possible approach would be the following:
- Identify the features of the new user through the profile;
- Compute similarity scores across these features and the features of other users who have a history of interactions by counting the features they have in common and dividing this count by the total number of features;
- The profile with the highest similarity score is considered the most similar profile;
- The preferences of the new user become the same as the preferences of this most similar profile.
Based on this, preferences can be inferred for any user, and then the compatibility scores can be computed using the preferences of user x and each of the other users’ profiles. To compute the compatibility scores in the reverse direction the profile of user x and each of the other users’ preferences are required. These compatibility scores mean how much a user x likes a user y and vice versa, or how much a user prefers another user. With these unidirectional compatibility scores, the bidirectional compatibility score is computed by the harmonic mean of the previously described scores. The following steps briefly describe this technique for a pair of users x and y:
- Compute the unidirectional compatibility score between user x‘s preferences and user y‘s profile;
- Compute the unidirectional compatibility score between user x‘s profile and user y‘s preferences;
- Compute the harmonic mean between these scores.
Finally, the top-N users with the highest bidirectional compatibility scores are chosen. Here is an example of how to calculate the unidirectional compatibility score between user x‘s preferences and user y‘s profile.
- User x‘s preferences:
- User y‘s profile:
- Category score:
- Unidirectional compatibility score:
Evaluation metrics
Evaluate the performance of any system is fundamental to understand if the system works according to the requirements. There are two approaches to evaluate the performance of recommendation systems: offline testing and online testing.
Regarding offline testing, these are used to measure the model performance through evaluation metrics for recommendation systems, such as Hit Ratio (HR), Mean Reciprocal Rank (MRR), Mean Average Precision (MAP), Normalized Discounted Cumulative Gain (NDCG), among others [5]. But it is not always possible to use these evaluation metrics because, depending on the business and the model, there may be no certainty about the correct validation of the suggested recommendations, since to date no user has validated its recommendation. In these circumstances and in general, online testing, also known as A/B testing, is the best way to evaluate recommendation systems.
In the recommendation systems paradigm, A/B testing is used to evaluate the model’s performance after user validations of the recommendations. In other words, the model suggests some recommendations, these recommendations are made available to users, and these users accept or reject the recommendations. With this, it is possible to verify the number of successful and unsuccessful recommendations according to the total number of recommendations. In the case of multiple models, A/B testing is carried out following the same approach, but for each of the models. Each model suggests a recommendation for a given user and that same user will accept or reject each one of these recommendations, being chosen the model with the best recommendation.
Bibliografia
[1] Isinkaye, F. O., Folajimi, Y. O., & Ojokoh, B. A. (2015). Recommendation systems: Principles, methods and evaluation. Egypt. Inform. J., 16(3), 261–273. https://doi.org/10.1016/j.eij.2015.06.005
[2] Roy, D., Dutta, M. A systematic review and research perspective on recommender systems. J Big Data 9, 59 (2022). https://doi.org/10.1186/s40537-022-00592-5
[3] https://dasci.es/wp-content/uploads/2020/08/AcmSigirTutorial_ReciprocalRecommendation-1.pdf
[4] Pizzato, L., Rej, T., Chung, T., Koprinska, I., Kay, J., 2010. RECON: a reciprocal recommender for online dating. Proceedings of the Fourth ACM Conference on Recommender Systems 207–214. https://doi.org/10.1145/1864708.1864747
[5] Schröder, Gunnar & Thiele, Maik & Lehner, Wolfgang. (2011). Setting Goals and Choosing Metrics for Recommender System Evaluations. 811. https://wiki.epfl.ch/edicpublic/documents/Candidacy%20exam/Evaluation.pdf