Neo4j acquires GraphAware. Learn more about this exciting new chapter.

Collaborative filtering

What is collaborative filtering?

Collaborative filtering is a recommendation technique that predicts what a person may be interested in based on the behaviour of other users with similar interests.

Rather than analysing the characteristics of an item itself, collaborative filtering looks for patterns in user behaviour. If two users consistently interact with similar products, films, documents, or other items, the system can recommend items one user has enjoyed to the other.

Collaborative filtering is widely used by streaming platforms, online retailers, music services, and other applications where personalised recommendations improve the user experience.

How collaborative filtering works

Collaborative filtering identifies similarities within historical user interactions.

The process typically involves:

  • Collecting user interactions, such as purchases, ratings, clicks, or views
  • Identifying users or items with similar behaviour
  • Calculating similarity scores
  • Recommending items based on those similarities

Two common approaches are used.

final graph model

User-based collaborative filtering

User-based collaborative filtering identifies people with similar behaviour.

For example, if Users A and B have watched many of the same films, and User B watches a film that User A has not seen, the system may recommend it to User A.

Item-based collaborative filtering

Item-based collaborative filtering compares relationships between items rather than users.

If many people who purchased Product A also purchased Product B, then Product B can be recommended to future customers who purchase Product A.

Advantages of collaborative filtering

Collaborative filtering offers several benefits:

  • Works across many industries and applications
  • Personalised recommendations without manually defining rules
  • Improves as more interaction data becomes available
  • Can uncover unexpected recommendations
  • Does not require detailed knowledge about the items themselves

Limitations of collaborative filtering

Like every recommendation approach, collaborative filtering also has limitations.

Common challenges include:

  • The cold-start problem for new users or new items
  • Sparse datasets with limited interaction history
  • Popularity bias towards frequently used items
  • Reduced accuracy when user behaviour changes rapidly

Many modern recommendation systems combine collaborative filtering with additional techniques to overcome these challenges.

Other recommendation approaches

Collaborative filtering is one of several recommendation methods.

Other common approaches include:

Content-based recommendations

Recommend items with similar characteristics to those a user has previously interacted with.

Hybrid recommendations

Combine collaborative filtering with content-based or other recommendation techniques to improve accuracy.

Session-based recommendations

Generate recommendations based only on a user’s current browsing session, making them useful when historical user profiles are unavailable.

Graph-based recommendations

Represent users, products, documents, or other entities as connected nodes within a graph.

Graph algorithms analyse relationships between users and items, allowing recommendation systems to discover complex patterns that traditional recommendation techniques may overlook.

Why graph-based recommendations are different

Graph-based recommendation systems model relationships directly rather than relying solely on user-item matrices.

This allows organisations to incorporate additional context, including:

  • Shared interests
  • Social relationships
  • Locations
  • Transactions
  • Events
  • Organisations
  • Multiple interaction types

Because graph models capture richer relationships, they can often produce more explainable recommendations while incorporating data from many different sources.

Common applications of collaborative filtering

Collaborative filtering is widely used across many industries.

E-commerce

Recommend products based on purchasing behaviour.

Streaming services

Suggest films, television programmes, music, or podcasts based on viewing and listening history.

Social media

Recommend people to follow, communities to join, or content that similar users have engaged with.

Online learning

Recommend courses, learning materials, or training based on previous activity.

How graph technology enhances recommendation systems

While collaborative filtering remains an important recommendation technique, many organisations now use graph technology to build more sophisticated recommendation systems.

Graphs make it possible to combine user behaviour with additional contextual information, such as relationships, transactions, locations, events, and organisational structures.

Rather than relying on similarity scores alone, graph-powered recommendations can uncover indirect connections and explain why particular recommendations have been made.

FAQs

What is collaborative filtering?

Collaborative filtering predicts user preferences by analysing the behaviour of similar users rather than the characteristics of the items themselves.

What is the difference between collaborative filtering and content-based filtering?

Collaborative filtering recommends items based on similarities between users or interactions. Content-based filtering recommends items based on their shared characteristics with items a user has already liked.

What is graph-based recommendation?

Graph-based recommendation models users, items, and their relationships as connected data within a graph, allowing recommendation engines to analyse richer relationships and uncover more complex patterns.

What industries use collaborative filtering?

Collaborative filtering is commonly used in retail, streaming services, social media, education, financial services, and digital marketplaces.

What is the cold-start problem?

The cold-start problem occurs when there is insufficient historical data about a new user or new item to generate accurate recommendations.