Knowledge-Based Recommender Systems: An Overview

Jackson Wu
5 min readMay 27, 2019

--

So far, in this series of articles on recommender systems, we’ve talked about different ways of leveraging someone’s rating history to recommend them item they might enjoy.

That’s great to know; but what if there is no rating history?

That’s right: it’s entirely possible that a user will have no ratings at all; not even a clickstream. In fact, every user in every service will start off like this.

It’s called the cold start problem, and it’s a real issue in recommender system design because it’s hard to make predictions when have no idea what the user’s preferences are. Another reason you might not have enough ratings could be if the things you are recommending are complex and highly customizable. These items, cars, houses, jewelry, are bought infrequently and can get so complex that ratings for similar items may not be available.

In this article, we’ll explore the ideas and techniques behind one of the simplest solutions to these problems: asking the user nicely!

Photo by Austin Distel on Unsplash

What is a knowledge-based recommender system?

A recommender system is knowledge-based when it makes recommendations based not on a user’s rating history, but on specific queries made by the user. It might prompt the user to give a series of rules or guidelines on what the results should look like, or an example of an item. The system then searches through its database of items and returns similar results.

A recommender system is knowledge-based when it makes recommendations based not on a user’s rating history, but on specific queries made by the user.

You might find an example of one if you’re looking for a house or a car online. Picture an interface where you input price, how many bathrooms, how much total floor space, etc., and the website returns a list of houses based on those constraints. These constraints could also be higher level, like “modern” or “spacious”. Familiar? This webpage might be a knowledge-based recommender system.

Now, you may be wondering, “Why does this problem even call for a recommender system? Can’t you just filter some entries out of a spreadsheet and call it a day?“

First off: Yes, it’s always okay to do that. Practice self-care. However, if you did choose to approach it that way, you’re missing out on much functionality. Remember that these item spaces might be complex, and filtering all but a certain item might return nothing. A recommender system also allows you to personalize the results to each user. We’ll get into specific examples of how to do this later. For now, we’ll take a brief walk through the stages of the recommendation process.

A Day in the Life

  • The user begins by making a query. As I mentioned earlier, this could be by constraints (constraint-based) or by example (case-based).
  • The first thing our algorithm will do is search our domain knowledge for relevant rules. Our domain knowledge is a library of “if-this-then-that” rules that are specific to our “domain”. In the domain of automobiles, a rule might look like: “new” → “Date: Within a year ago”. Note that we’re mapping a high-level attribute to requirement for item attributes. In the event that we find a relevant rule, the consequent is added to the query, and we repeat the process until all relevant rules are found.
  • Once all of the requirements are found, they are combined to form a single database query. This selection query is used to retrieve relevant items from database.
  • The user might “critique” the results — tightening and loosening parameters, or selecting the best items and changing specifications. This creates a new query, and the process repeats until the user finds a satisfactory item.

Improving Knowledge-Based Recommender Systems

So now we know what a knowledge-based recommender system is and how it works. The next step is to learn how to make one that works well.

Similarity Metrics

Your similarity metric is what allows you to find results that don’t exactly match the search query, which considering the application of knowledge-based recommenders, is vital. For each feature, you have to know two things: the relative importance of the feature and a utility function that describes the similarity between two values of the feature. This function might be as simple as taking the difference between the two values. It would be linear in this case, and could describe something like price (the cheaper, the better!). For a different parameter though, might ideally want to return result as close as possible to the user’s query.

Both this function and the weight for the parameter can be manually set by an expert in the field. However, they can also be learned with user feedback.

You should also aim for diversity in your search results, so the user has a variety of items to choose from and make changes to.

Critique Methods

Improving critiquing methods can also help the user to find relevant results consistently and quickly.

The main danger in knowledge-based systems is that the user ends up aimlessly wandering through the product space, and finds nothing of interest. Explaining recommendations and possible conflicts between requirements can prevent this.

Another simple way to improve critiquing methods is to suggest high-level changes that impact many parameters. This both expedites the search, and spares the user the work of translating the changes they want into low-level parameter adjustments.

A more advanced technique is dynamic critiquing. Dynamic critiquing attempts to return the most relevant possibilities based on the current results. What this means is, if you are looking for cheap housing, but you are already browsing the cheapest housing with the features you want, there might not be a path forward that reduces price and satisfies all of your other constraint. Dynamic critiquing looks at all the possibilities for adjusting your query and returns the most frequently found patterns, like “less bedrooms, cheaper price”. By searching for common patterns across all the results, the user can pick a critique that yields many search results, and thus many choices.

Personalization

Knowledge-based recommender systems can also be personalized to individual users in several ways.

  • The learning of utility and similarity functions can be personalized for case and constraint-based recommender systems. You can use user feedback to assign importance to particular variables.
  • You can keep track what constraints users choose in their queries, and suggest constraints based on common choices.
  • Dynamic critiques can be personalized by looking at the support for a combination of modifications in that user’s history. (user-specific vs. support of all data).

These are just a few ideas; there are myriad ways knowledge-based recommender systems can be personalized.

Conclusion

Though they are a tool that solves a specific problem, knowledge-based recommender systems can be quite useful, especially in conjunction with other forms of recommender systems. They can work in the short term as a solution to the cold start problem and switch to collaborative filtering or content-based systems when sufficient ratings are acquired.

Knowledge-based recommenders can also be valuable tools on their own, especially when the item space is complex, or infrequently used.

I hope you enjoyed this overview. Check out the rest of this series to learn more about recommender systems.

--

--