Computing Library › Machine Learning
Machine Learning

Collaborative Filtering

Collaborative filtering recommends items by finding patterns in the preferences of many users, without item content.

Wisdom from co-occurrence

Collaborative filtering (CF) predicts what a user will like from the accumulated behavior of many users, using only the interaction matrix of who engaged with what. It needs no descriptions of items or users: if people who agreed with you in the past liked an item, you probably will too. This makes CF powerful but reliant on having enough interaction history.

Neighborhood methods

Kronos motion — lego machine

The classic approach is memory-based. User-based CF finds users similar to the target (by cosine or Pearson similarity over shared ratings) and predicts from their ratings. Item-based CF instead measures similarity between items and recommends items close to those the user already liked; it is usually more stable because item-item similarities change slowly and can be precomputed.

Model-based methods

Neighborhood methods struggle as the matrix grows sparse. Model-based CF learns compact latent representations instead, most famously through matrix factorization, which embeds users and items in a shared low-dimensional space so that a dot product predicts preference. These models generalize better and scale to large catalogs.

The hard problems

Cold start is often addressed by falling back to content features or hybrid models. Popularity bias and feedback loops require deliberate evaluation on held-out time periods rather than random splits, so that the model is judged on genuinely future behavior. When feedback is implicit (clicks, plays) rather than explicit ratings, the modeling changes, as covered in implicit-feedback recommendation.