# Recommender Systems, Simply Explained

#42 Mar 17, 2025 Foundation

https://www.aibutsimple.com/p/recommender-systems-simply-explained

In Partnership With:

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/aafb16a3-681b-48d3-befc-49a083403a03/BLOTATO__8_.png)

In the last decade, much of the world has moved online, creating large-scale online services—changing the way we read news, buy products, and watch movies.

The abundance of items (and choices) online needed systems that could personalize our experience by discovering items tailored to our individual preferences. This led to the creation of recommender systems, machine learning models that use data about a user’s past behavior to predict what items (like products, movies, or music) they might be interested in.

They can then use this data to suggest and recommend relevant items to consumers, saving consumers time and reducing the problem of information overload—while also adding business value by optimizing sales and personalizing the customer experience.

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/9533a700-1a5e-4c69-bdab-aa3afc109147/Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Add_a_heading__720_x_600_px___720_x_500_px___1_.png)

Recommender systems are used by top companies such as Spotify, Apple, Amazon, Netflix, and YouTube, where they have enormous amounts of content (petabytes of data); these systems keep users interested.

- For instance, take YouTube, where 500 hours of videos are uploaded every minute: it would take 82 years for a user to watch the videos uploaded in just the last hour.
- On Spotify, users can listen to more than 80 million songs and podcasts. There are over 350 million different products listed on Amazon.

---

Big thanks to our partners for keeping this newsletter free. If you have a second, clicking the ad below helps us a lot—and who knows, you might find something you’ll enjoy.

#### [Blotato — The #1 AI Content Engine; Create Viral Posts and Faceless AI Videos Today!](https://l.blotato.com/aibutsimple?utm_source=newsletter.aibutsimple.com&utm_medium=referral&utm_campaign=recommender-systems-simply-explained)

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/a9866bf2-9d93-4483-b2ad-3ca4cf6cdf12/Your_paragraph_text__2_.png)

- All-in-one solution for 50+ pieces of AI-generated content per week
- Make faceless videos in 30 languages with prebuilt viral templates (build your brand without showing your face).
- Access top AI models in 1 place (Flux, Kling, Runway, Minimax, Hunyuan, Ideogram, LTX, Veo)
- Consistent scenes and smooth transitions for continuous storytelling

[Go Viral on Instagram, TikTok, and Youtube 10x Faster With AI Using Blotato](https://l.blotato.com/aibutsimple?utm_source=newsletter.aibutsimple.com&utm_medium=referral&utm_campaign=recommender-systems-simply-explained)

---

### Explicit Feedback and Implicit Feedback

In recommender systems, machine learning models are used to predict the rating (rᵤᵢ) of a user (u) and some item (i).

To predict this rating, we need to collect user feedback for training and evaluating our models.

- There are two main ways to collect feedback: either explicitly or implicitly.

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/d8d16216-8f30-4f63-8435-ffbec380e99b/Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Add_a_heading__720_x_600_px_.png)

Explicit feedback is a rating explicitly given by the user to express their experience with an item. Some examples include:

- Number of stars from 1 to 5.
- Thumbs up/down.
- Written reviews.

This type of feedback is very concrete and tends to be more detailed, but this type of data is scarce since many users don’t explicitly write reviews or give ratings.

Implicit feedback, on the other hand, assumes that the interactions of a user with an item are an indication of preference (preferring comedy movies over action movies after watching many comedy movies). Some examples include:

- Browsing/purchasing history of a user.
- Songs played by a user.
- Movies watched by a user.

Implicit feedback is extremely abundant (it’s collected everywhere), and that is why most modern recommender systems rely on implicit feedback. However, it is less detailed and noisier—less concrete in general.

Recommender systems themselves also fall into many different categories, with collaborative filtering and content-based filtering being the two main ones.

### Collaborative Filtering

Collaborative filtering algorithms recommend items based on user-item preference information from many users (collaborative).

These recommender systems build a model from a user’s past behavior and identify patterns in the decisions of similar users to predict future interactions and suggest relevant items.

For instance, if a user purchases a dog bowl and a bone, and another user buys the same products but also purchases a dog house, the system might recommend the dog house to the first user—assuming they may also like it based on similar interests.

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/0456de88-3ae5-45f3-a0db-92ff8a444046/Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Add_a_heading__720_x_600_px___720_x_500_px___1_.png)

The core idea is that if users have made similar decisions in the past (such as movie choices), there’s a high enough chance they will agree on additional future recommendations.

Collaborative filtering methods do not use data about items or users but try instead to leverage the interactions between users and items (e.g., the activity history of all users) to learn correlations or dependencies.

Using machine learning and collaborative filtering, we typically try to factorize a rating matrix (Rᵤᵢ) in order to make predictions on empty ratings, for example, ratings for a movie that a user has not yet watched.

### Matrix Factorization

Matrix Factorization (Koren et al., 2009) is a well-established collaborative filtering method—it is extremely popular and effective. Its goal is to predict missing entries in a user-item interaction matrix (rating matrix Rui) by decomposing it into lower-dimensional matrices representing latent factors.

- A latent factor is a hypothetical variable that is not directly observed but is believed to influence other variables. Latent factors are also known as latent traits or latent variables.

#### Explicit Feedback

Given explicit feedback through ratings or reviews, the simplest idea is to model user-item interactions through a linear model (a simple matrix multiplication).

The user-item interactions (such as ratings) form a sparse matrix R of size u×i, where u is the number of users and i is the number of items.

- Missing entries in the matrix represent unobserved interactions—like movies a user hasn’t rated.

The goal is to approximate the original matrix R by the product of two lower-dimensional matrices P (user features) and Q (item features).

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/22128177-ddda-41f3-a9c4-c82d8b6b2b1a/image.png)

- The user matrix P has size u×k, where each row Pu represents a user in a k-dimensional latent space.
  - The latent space is a lower-dimensional, abstract representation of data where each dimension corresponds to a latent factor. It is the same latent space we discuss in autoencoders.
  - For instance, the latent space can be different genres of movies or different sizes of items.
- The item matrix Q has size i×k, where each row Qi represents an item in the same latent space.

Given the approximation, the predicted rating for user u and item i is:

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/7b5ec6e5-9237-4b78-869d-21d686a8eb00/image.png)

Let’s see how this can work in practice. For instance, given a movie recommendation system:

- Some examples of latent factors might be action intensity, romantic content, and comedic value.
- User vectors quantify how much a user prefers each factor.
- Item vectors quantify how much a movie aligns itself with each factor.

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/47c453c8-f113-4651-b52c-435625fab231/Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Add_a_heading__720_x_600_px___720_x_500_px_.png)

To learn the values of P and Q, we can minimize an MSE loss over the set K of pairs (u, i) for which Rᵤᵢ is known. The algorithm so obtained is called probabilistic matrix factorization (PMF). Mathematically:

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/c28ddfae-064b-4ea3-8890-79b749314a9b/y__3_.png)

Here, λ represents the regularization rate. The whole term on the right is for regularization to avoid overfitting by penalizing the magnitude of the parameters.

The loss function can either be minimized using an optimizer such as stochastic gradient descent (SGD) or using something called the alternating least squares algorithm (ALS).

The first approach is to use SGD. SGD is easy to implement, but it may have some issues because both Pᵤ and Qᵢ are unknown and therefore the loss function is not convex.

To solve this issue, we can alternatively fix P and solve for Q, then alternate. This produces a convex linear regression problem that can be easily solved with ordinary least squares (OLS).

This second method is the alternating least squares (ALS) method and allows for significant speedup.

Matrix factorization can also be used for implicit feedback datasets by using a confidence matrix and modifying our rating matrix.

For instance, let’s assume that the implicit feedback measured the percentage of a movie that a user watched. If this feedback is equal to 0.1, it means that the user watched 10% of it.

We fill our matrices by scaling this feedback by different constants, then use the same method to compute the empty entries in our rating matrix.

---

### Seeking impartial news? Meet 1440.

Every day, 3.5 million readers turn to [1440](https://l.join1440.com/bh?utm_source=beehiiv&utm_medium=cpc&utm_campaign=ai_but_simple_XIAEVJHTGJ&utm_content=prospecting_impartial&_bhiiv=opp_7b0dc1a1-feb7-4364-978f-c126a67ba242_1b75ca79) for their factual news. We sift through 100+ sources to bring you a complete summary of politics, global events, business, and culture, all in a brief 5-minute email. Enjoy an impartial news experience.

[Join for free today!](https://l.join1440.com/bh?utm_source=beehiiv&utm_medium=cpc&utm_campaign=ai_but_simple_XIAEVJHTGJ&utm_content=prospecting_impartial&_bhiiv=opp_7b0dc1a1-feb7-4364-978f-c126a67ba242_1b75ca79)

---

### Content Filtering

Content-based methods use known data describing users and items.

Each item (i) is now represented by a set of relevant tags; for instance, movies can be tagged as "action" or "comedy".

Each user (u) is represented by a user profile, which can be created from known user information (such as age or height) or from the user’s past activity.

For example, let’s say we are a music streaming service (like Spotify). If a user listens to a song, we can then recommend other songs that are very similar to the original song:

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/e38f487c-163e-4f10-ae5c-f218bf02f111/Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Copy_of_Add_a_heading__720_x_600_px___720_x_500_px_.png)

A popular content-filtering approach is to use a k-nearest neighbors (KNN) model.

KNN is usually used as a simple classification algorithm that classifies new points into classes whose proximity is closest to them. The point will be assigned the class of the cluster closest to it.

However, in content-based filtering, KNN will identify the "K most similar items" to a target item or user profile and output them. KNN will also operate on item features and user profiles.

The advantage of content-based filtering is that we don’t need user-item interaction data, making it useful for “cold-start” scenarios where little to no interaction data is available for new items and users.

That being said, we need to have data on each item and user—which can get expensive. Additionally, content-based methods are usually less accurate, while collaborative methods such as matrix factorization usually result in a higher accuracy stemming from using user-item interactions.

### Hybrid Methods

Finally, there are also hybrid methods that combine the known data from users and items along with the set of observed user-item interactions to achieve better results.

This approach leverages the advantages of both content-based and collaborative filtering methods.

An example of a hybrid method might be to weigh scores from content-based and collaborative methods and sum them up for a total score.

- Most hybrid methods used today are improvements on the matrix factorization model.

---

Here’s a special thanks to our [biggest supporters](https://www.aibutsimple.com/upgrade?utm_source=newsletter.aibutsimple.com&utm_medium=referral&utm_campaign=recommender-systems-simply-explained):

Sushant Waidande

---

If you enjoy our content, consider supporting us so we can keep doing what we do. Please share this with a friend!

Want to reach 50,000+ ML engineers? Let’s work together:

[WORK WITH US 📈](https://www.passionfroot.me/aibutsimple?utm_source=newsletter.aibutsimple.com&utm_medium=referral&utm_campaign=recommender-systems-simply-explained)

Feedback, inquiries? Send us an email at [edwin@aibutsimple.com](mailto:edwin@aibutsimple.com).

If you like, you can also donate to our team to push out better newsletters every week!

[Support us ☕](https://ko-fi.com/aibutsimple?utm_source=newsletter.aibutsimple.com&utm_medium=referral&utm_campaign=recommender-systems-simply-explained)

---

That’s it for this week’s issue of AI, but simple. See you next week!

—AI, but simple team
