In this section, we formally define the filter bubble problem in RS and detail the current popular algorithms used. We then introduce our proposed serendipitous approach. After defining the problem and approaches, we explain the algorithms used in both CRS and SRS that were implemented in our user study to verify our approach. Additionally, we introduce an expanded version of the QSEM (E-QSEM), designed to assess the serendipity potential in recommender systems.
3.1. Defining the Filter Bubble Problem and Approaches in Recommender Systems
Definition 1 (Recommender system). A recommender system (RS) is an algorithmic framework designed to suggest relevant items to users based on their preferences and interactions. The recommendation process is formalized in Algorithm 1, which outlines the key inputs and how they are processed to generate relevant recommendations.
Algorithm 1 Recommender system |
Input | |
U | A set of users |
I | A set of items |
U_profile | Information about users such as name, age, gender and demographic details |
U_history | Information about past interactions of users such as watch history, ratings, time spent and search queries |
I_meta | Metadata of items such as categories, keywords, authors, and ratings |
Output | |
R(U) | A list of recommended items from the set I for each user u |
| |
Definition 2 (Filter bubble problem). The filter bubble problem in RS arises when users are consistently presented with content that aligns closely with their existing preferences and behaviors, resulting in a lack of exposure to diverse or novel items. The filter bubble problem can be framed as follows:
The recommender function f overly relies on high similarity scores, leading to recommendations that are too similar to past interactions.
The system fails to introduce new and unexpected content, reducing the likelihood of discovering new interests.
Recommendations reinforce the user’s existing preferences, creating a feedback loop that strengthens the filter bubble.
Definition 3 (Content-Based Filtering). Content-based filtering (CBF) is a type of RS algorithm that suggests items to users based on the features of the items and the preferences or behavior of the user.
The core idea of CBF is to recommend items similar to those that a user has liked in the past. However, it focuses solely on the user’s current interests, which can lead to a lack of diversity in recommendations. This means there is a low possibility of discovering new interests.
Definition 4 (Collaborative Filtering). Collaborative filtering (CF) is a type of RS algorithm that suggests items to users based on the preferences and behaviors of other users.
The core idea of CF is that users who have agreed in the past will agree in the future. However, recommendations tend to circulate among similar users, reinforcing the filter bubble. Additionally, this method has difficulty recommending new users or new content, known as the cold start problem.
Definition 5 (Hybrid Filtering). Hybrid filtering combines multiple recommendation techniques, typically CBF and CF, to leverage the strengths and mitigate the weaknesses of each approach.
The goal of hybrid filtering is to provide more accurate, diverse, and reliable recommendations by combining the predictions of content-based filtering and collaborative filtering. However, it may also inherit the drawbacks of both approaches.
From an algorithmic perspective, we can identify the limitations of existing RS Algorithms 2–4 in terms of the filter bubble problem. To address these issues, we propose a new approach Algorithm 5 that balances relevance with diversity and serendipity in the recommendations.
Algorithm 2 Content-based filtering |
Input | |
U | A set of users |
I | A set of items |
U_profile | Information about users such as name, age, gender and demographic details |
U_history | Information about past interactions of users such as watch history, ratings, time spent and search queries |
I_meta | Metadata of items such as categories, keywords, authors, and ratings |
Output | |
R(U) | A ranked list of items with the highest similarity to those the user has interacted with or liked in the past from the set I for each u |
Algorithm 3 Collaborative filtering |
Input | |
U | A set of users |
I | A set of items |
U_profile | Information about users such as name, age, gender and demographic details |
U_history | Information about past interactions of users such as watch history, ratings, time spent and search queries |
I_meta | Metadata of items such as categories, keywords, authors, and ratings |
Output | |
R(U) | A ranked list of items with the highest ratings given by similar users from the set I for each u |
Algorithm 4 Hybrid filtering |
Input | |
U | A set of users |
I | A set of items |
U_profile | Information about users such as name, age, gender and demographic details |
U_history | Information about past interactions of users such as watch history, ratings, time spent and search queries |
I_meta | Metadata of items such as categories, keywords, authors, and ratings |
Output | |
R(U) | A ranked list of items with the highest ratings, calculated by combining the predictions of content-based filtering and collaborative filtering from the set I for each u |
Definition 6 (Serendipitous Filtering). Serendipitous filtering is a type of RS algorithm designed to not only provide relevant recommendations based on user preferences but also to introduce unexpected and novel items that the user might find interesting.
The goal of serendipitous filtering is to enhance user satisfaction by balancing familiarity with discovery. This approach predicts the utility of an item for a user while ensuring a mix of familiar and novel items. It provides a recommendation list that balances current interests with new potential interests, mitigates the filter bubble by including diverse categories and topics, and introduces serendipity by intentionally incorporating unpredictable content.
Algorithm 5 Serendipitous filtering |
Input | |
U | A set of users |
I | A set of items |
U_profile | Information about users such as name, age, gender and demographic details |
U_history | Information about past interactions of users such as watch history, ratings, time spent and search queries |
I_meta | Metadata of items such as categories, keywords, authors, and ratings |
Output | |
R(U) | A ranked list of items that the user has not yet rated, balancing relevance and novelty from the set I for each u |
While one might argue that the filter bubble issue could be addressed simply by introducing randomness into collaborative filtering, this approach lacks a mechanism to ensure that the recommended content remains relevant and engaging. Naive randomization may introduce novelty but does not guarantee that the suggested items will be meaningfully diverse or valuable to the user. Instead, our serendipity-aware filtering approach moves beyond pure randomness by structuring diversity through operator preferences, which can be inferred using personalized data or persona-based inference models.
By integrating structured randomness, where serendipitous factors are algorithmically weighted rather than purely random, our method ensures that recommendations remain both engaging and diverse. This approach systematically balances relevance and unexpectedness, allowing users to discover novel content while still receiving recommendations aligned with their preferences. In doing so, our model effectively mitigates the filter bubble, providing a more structured and personalized way to enhance exploration without compromising user satisfaction.
Table 2 illustrates the variations in recommendation output depending on the RS algorithm applied to the sample instance depicted in
Figure 1. The first three approaches—content-based filtering, collaborative filtering, and hybrid filtering—represent standard recommendation techniques, while serendipity filtering is the methodology introduced in this study.
Content-based filtering recommends three items to user by calculating the similarity between the items that has rated and the other items in the dataset. The goal is to recommend items most similar to those has liked. First, it identifies the features of the items has rated, such as category, keyword, and director. Then, it calculates the similarity between these rated items and the other items in the dataset. Finally, it recommends the top three items with the highest similarity scores that has not rated. Based on the calculated similarity scores, the content-based filtering algorithm would recommend items H, K, and J to user .
Collaborative filtering recommends items to by analyzing the ratings given by similar users. It identifies these similar users based on their rating patterns and suggests items they have rated highly. First, it calculates the similarity between and other users. Given that is the most similar user, followed by , collaborative filtering examines the items rated by and (B, C, G, J, K). It then selects the highest-rated items by and that has not yet rated. Thus, collaborative filtering would recommend items G, J, and K to .
Hybrid filtering combines the strengths of both content-based filtering and collaborative filtering to provide recommendations. It combines the results from both methods and considers their weights. Content-based filtering recommends items H, K, and J, while collaborative filtering recommends items G, J, and K. Since items J and K appear in both recommendation lists, they are strong candidates for recommendation. We used a simple average to combine the scores from both content-based and collaborative filtering, assuming equal weights for simplicity ( and ). To decide between H and G, it calculates the combined score using the formula: . Using this formula, we know that G has a higher combined score than H. Therefore, hybrid filtering would recommend items J, K, and G to .
Lastly, serendipity filtering recommends items to by balancing relevance, novelty, and unexpectedness. It first calculates the similarity between the items has rated and other items in the dataset. Next, it assesses how novel or unexpected an item is for based on their user history; items that share less common metadata with previously rated items are considered novel and unexpected. By combining the similarity and unexpectedness scores, a final score for each item is obtained. Using this approach, we can determine that serendipity filtering would recommend items D, H, and K to . From this instance, it is evident that existing recommendation functions primarily focus on relevance and similarity, limiting their recommendations. In contrast, serendipity filtering balances relevance with diversity and unexpectedness, providing more varied and surprising recommendations.
3.2. RS Models
In this section, we establish a set of terminologies for consistency throughout our discussion. An RS is a system that assesses user behavior and suggests the most suitable item for that user. The selected item (SI) is the current item chosen by the user and utilized by the RS to analyze user behavior. The recommended item (RI) is an item proposed by the RS to the user after evaluating the user’s selected item.
We developed two versions of an RS, the SRS and CRS, to highlight the influence of serendipity within the RS. Each RS was designed to suggest three RIs when the user enters the title of their preferred movie into the RS. The CRS uses a content-based filtering (CBF) algorithm that employs item characteristics to recommend items similar to those users prefer, based on their SIs.
The CRS model identifies RIs relevant to the user based on a similarity measure, as illustrated in Equation (
2), using the feature matrix and average rating data depicted in
Figure 2. The feature matrix is designed to indicate the presence or absence of various feature tags for each item in the dataset [
30]. Ref. [
31] confirmed that keyword tags can be used to compute similarity between two different items. It is organized into rows and columns, with each row representing an item and each column representing a feature tag. In this matrix, each cell corresponding to an item is marked with a 1 or 0 in the feature tag columns, signifying whether the item possesses or lacks that particular feature tag. This procedure is applied to every item in the dataset, culminating in a binary matrix where each row offers a multi-label one-hot encoded depiction of the item’s feature tags. The average rating is simply the mean rating given to the item by users. The CRS computes similarity measures for all possible pairs of <
SI,
X>, where SI is fixed, and X is an item drawn from the dataset. The top three items with the highest similarity measures are chosen as RIs. The CRS is specific to an individual user as this model does not utilize any information about other users.
where · =
dot product, ¯ =
normalization.The SRS employs a filtering algorithm that integrates both item features and serendipity characteristics to suggest items to users based on their SIs. The SRS is designed with the intent to facilitate the experience of serendipity for users when receiving recommendations via the RS.
The SRS model selects RIs based on a serendipity measure, as depicted in Equation (
3). For the pair <
SI,
X>, if they belong to the same genre, the weight of the category is 0.5; otherwise, it stands at 1. All other elements are computed in the same manner as for the similarity measure. The top three items with the highest serendipity measures are chosen as RIs.
The SRS, like CRS, is tailored to a particular user. However, the SRS produces more diverse recommendations by incorporating the category information of items. It also uses the reciprocal of the dot product of the feature matrix to avoid run-of-the-mill recommendations, ensuring that when the dot product is zero, the result is set to zero as well.
where · =
dot product, ¯ =
normalization.The issues associated with the filter bubble in an RS include the system’s tendency to recommend items that are excessively similar to those the user has already shown interest in, which can lead to a lack of diversity. Additionally, it decreases user engagement by suggesting items that are predictable and conspicuous. The SRS addresses these problems by adopting a different approach. Unlike the CRS, which selects items based on similarity and popularity, the SRS prioritizes user preferences and slightly diminishes the emphasis on similarity. Furthermore, the SRS reduces the likelihood of recommending items from the same domain, thereby making the recommendations more unexpected and diverse.
3.3. E-QSEM
Ref. [
6] pursued an investigation to quantitatively gauge the probability of a user encountering the phenomenon of serendipity while navigating a hypertext space (refer to
Figure 3).
We broadened the scope of QSEM to assess the level of serendipity in an RS in terms of its interestingness, unexpectedness, and diversity (refer to
Figure 4). Each component evaluates an RS on the following aspects:
Unexpectedness: The degree of surprise experienced by a user upon discovering a page.
Interestingness: The level of fascination of a user with a page they have encountered unexpectedly.
Diversity: The extent to which a variety of different items are included in the recommendations.
While various papers have discussed serendipity measures [
26,
32] and the factors contributing to serendipity, including diversity, interestingness, and unexpectedness, there is a noticeable absence of research specifically aimed at quantifying unexpectedness in a manner that transcends mere dissimilarity. Previous methodologies predominantly equate unexpectedness with dissimilarity, operating under the assumption that recommendations significantly different from a user’s historical interactions or preferences are inherently unexpected. However, this approach oversimplifies the complex nature of unexpectedness by ignoring the contextual and semantic relationships between items. Simply put, not all dissimilar items lead to a serendipitous experience; some may merely result in irrelevant surprises that do not enrich the user’s experience or discovery process. Ref. [
33] also emphasized that inducing serendipity requires careful consideration of ensuring content coherence and relevance while enabling novel and unexpected discoveries. Our proposed measure for unexpectedness diverges from this conventional approach by not merely quantifying dissimilarity but by assessing the semantic distance within the context of the item. We assess the semantic distance between items by initially organizing them into a taxonomy structure and then calculating the shortest path from one item to another, as described in
Section 3.3.1. This means that our measure considers the contextual connections between the recommended item and the user’s interests or past interactions. By doing so, we ensure that the unexpectedness we identify is not just about being different but about being meaningfully different—where the surprise stems from discovering something new and relevant that the user might not have found on their own but finds intriguing or valuable upon encounter.
3.3.1. Unexpectedness
Unexpectedness assesses the degree to which the RIs presented to users diverge from the anticipated category. Each item, such as a movie, is categorized within a hierarchical classification system, where broader categories (e.g., “Movies”) branch into more specific subcategories (e.g., “Action,” “Comedy,” “Drama”). To quantify unexpectedness, we measure the semantic distance between the SI and the RI within this hierarchy, as well as the degree of dissimilarity between the items. The semantic distance represents the shortest path between two items in the classification tree. Meanwhile, dissimilarity is determined based on feature tags assigned to each item, represented as vectors—fewer shared tags indicate a higher degree of dissimilarity.
As demonstrated in
Figure 5, if a user selects Movie A and the recommendation system suggests Movie C, the shortest distance in the classification hierarchy from Item A to Item C is 4. Movie A is categorized under Adventure, while Movie C belongs to Animation, both of which fall under the broader Movies category. First, moving up one level from Movie A reaches its parent category, Adventure. Second, moving up another level from Adventure reaches the common parent category, Movies. Third, moving down one level from Movies enters the Animation category. Finally, moving down one more level from Animation reaches Movie C. Since it takes four steps to move from Movie A to Movie C, the semantic distance is 4. The unexpectedness measure is then calculated as the product of this distance and the dissimilarity score, capturing how far the recommendation deviates from the user’s anticipated category.
3.3.2. Interestingness
Interestingness measures the degree to which users are recommended captivating items. Ref. [
34] confirmed that leveraging sentiment analysis of user reviews enhances the quality of recommender systems, improves their performance, and assists users in making better decisions. Similarly, in our evaluation, actual rating data for each item is utilized, with ratings ranging from 0 to 5, as shown in
Figure 6.
3.3.3. Diversity
Diversity is an evaluation of the variety of recommended items within a recommendation list. To assess this, we calculate the proportion of unique items that have been used as recommendations out of the total item pool, meaning we calculated all possible recommendation scenarios (refer to Equation (
4)). In a traditional RS, certain popular items are often repetitively recommended, leading to less popular items being consistently overlooked. The diversity metric reflects the notion that the potential for a user to experience serendipity increases when a wider array of items is recommended.