Skip to content
Back to search results

Collaborative Filtering

Introduced by
GroupLens; Sarwar et al. (item-based); Koren et al. (matrix factorization)
Year
2001
Type
Recommendation from user-item interactions
Family
Recommender systems
Font size

What does it do?

Collaborative filtering recommends items to a user by leveraging the preferences of many users — 'people who liked what you liked also liked this'.

It learns from a sparse user-item interaction matrix, either by finding similar users or items (neighbourhood methods, formalized by Sarwar et al. in 2001) or by factorizing the matrix into latent user and item factors (matrix factorization, popularized by Koren et al. after the Netflix Prize).

The intuition behind the method

You do not need to know anything about an item's content to recommend it — only how people have interacted with it. Collaborative filtering exploits patterns in a giant, mostly-empty table of users versus items: if two users rated many films alike, one's unseen favourites are good bets for the other (user-based); if two items are rated similarly across users, liking one predicts liking the other (item-based). Matrix factorization goes deeper, explaining each rating as the dot product of a short 'taste' vector for the user and a 'profile' vector for the item, learned to reconstruct the known ratings and predict the missing ones.

History

Collaborative filtering emerged from the GroupLens project and Tapestry in the 1990s. Sarwar, Karypis, Konstan, and Riedl (2001) formalized scalable item-based collaborative filtering, and the 2006–2009 Netflix Prize spurred latent-factor matrix-factorization methods, summarized in Koren, Bell, and Volinsky's influential 2009 article. The field has since extended to implicit feedback, hybrid content-collaborative models, and deep-learning recommenders, but neighbourhood and matrix-factorization collaborative filtering remain the foundational techniques.

When to use it

Use collaborative filtering to build recommendations from interaction data alone — e-commerce, streaming, news, and content platforms — when you have enough users and interactions to reveal shared patterns and do not want to rely on item content. Neighbourhood methods are simple and interpretable ('because you liked X'); matrix factorization scales better, handles sparsity, and usually predicts more accurately. Key limitations: the cold-start problem (new users/items with no interactions can't be placed), sparsity and popularity bias, and the need for substantial interaction data. Pure collaborative filtering ignores item/user attributes, so it is often combined with content features into hybrid recommenders; implicit-feedback and deep-learning recommenders extend the same idea. It is closely related to matrix completion and NMF.

Limitations and considerations

  • Cold-start: cannot recommend for new users or items with no interactions.
  • Sensitive to sparsity and biased toward popular items.
  • Ignores item/user attributes (content), unlike hybrid approaches.
  • Requires substantial interaction data to work well.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Needs only interaction data — no item content or feature engineering.
  • Captures subtle, hard-to-articulate taste patterns from the crowd.
  • Matrix factorization scales to large, sparse matrices and predicts accurately.
  • Neighbourhood methods give interpretable 'because you liked …' explanations.

Applications

  • Product recommendations in e-commerce.
  • Movie, music, and video recommendations on streaming platforms.
  • News and content personalization.
  • Friend / connection suggestions in social networks.
  • Cross-sell and 'customers also bought' features.

How it works

How it works

1

The input is a user-item matrix of ratings or implicit interactions (clicks, purchases). It is extremely sparse — most entries are unknown — and the task is to predict the missing entries (how a user would rate/like an unseen item) so the top predictions can be recommended.

Formula
R \in \mathbb{R}^{u\times i}\ \text{(ratings/interactions, mostly missing)}
2

Neighbourhood methods compute similarity between users (or between items) from their overlapping ratings, typically cosine similarity or Pearson correlation. High similarity means two users share taste, or two items attract the same audiences; these similarities drive the predictions.

Formula
\text{sim}(a,b) = \dfrac{\sum_k r_{ak} r_{bk}}{\sqrt{\sum r_{ak}^2}\sqrt{\sum r_{bk}^2}}\ (\text{cosine / Pearson})
3

Item-based collaborative filtering predicts a user's rating for an item as a similarity-weighted average of that user's ratings on similar items (user-based does the analogous thing over similar users). Item-based is usually preferred at scale because item-item similarities are more stable and precomputable.

Formula
\hat r_{ui} = \dfrac{\sum_{j\in N(i)} \text{sim}(i,j)\, r_{uj}}{\sum_{j\in N(i)} |\text{sim}(i,j)|}
4

Latent-factor models factor the rating matrix into low-rank user and item matrices, so each rating is approximated by the dot product of a user-factor vector and an item-factor vector. The factors are learned by minimizing regularized squared error over the observed ratings (via SGD or alternating least squares), and they capture hidden dimensions of taste, generalizing better and handling sparsity well.

Formula
\hat r_{ui} = p_u^\top q_i,\quad \min_{P,Q}\sum_{(u,i)\in\mathcal{K}} (r_{ui}-p_u^\top q_i)^2 + \lambda(\lVert p_u\rVert^2+\lVert q_i\rVert^2)

Common pitfalls

  • Ignoring the cold-start problem in deployment (new items get no exposure).
  • Evaluating on rating error alone while ignoring ranking/top-N and popularity bias.
  • Using user-based CF at scale where item-based or factorization is far more efficient.
  • Leaking future interactions into training when splitting data (must split by time).

Frequently asked questions

What is the difference between user-based and item-based collaborative filtering?

User-based CF recommends items liked by users similar to you; item-based CF recommends items similar (in how users rated them) to ones you already liked. Item-based is usually preferred at scale because item-item similarities are more stable over time and can be precomputed offline.

How does matrix factorization improve on neighbourhood methods?

It represents users and items by short latent-factor vectors learned from the data, so each rating is their dot product. This captures hidden taste dimensions, handles sparsity better, generalizes beyond direct neighbours, and typically predicts more accurately — which is why it dominated the Netflix Prize solutions.

What is the cold-start problem?

Collaborative filtering relies on past interactions, so it cannot make good recommendations for brand-new users or items that have none. Remedies include asking for initial preferences, falling back to popularity, or hybridizing with content-based features that don't require interaction history.

Related methods

Sources

  1. Sarwar, B., Karypis, G., Konstan, J., & Riedl, J. (2001). Item-based collaborative filtering recommendation algorithms. Proceedings of the 10th International Conference on World Wide Web, 285–295.

    Open DOI reference
    Copied.
  2. Koren, Y., Bell, R., & Volinsky, C. (2009). Matrix factorization techniques for recommender systems. Computer, 42(8), 30–37.

    Open DOI reference
    Copied.