Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 2.27 KB

File metadata and controls

54 lines (41 loc) · 2.27 KB

Movie Recommender System with GNNs

This repository contains my project for the Exam of Information Retrieval @University of Trieste; it consists in the implementation of a Movie Recommender System using Graph Neural Networks (GNNs), specifically leveraging the LightGCN model. The system provides personalized movie recommendations based on user interactions and allows users to get recommendations for movies and users.

Cool Image

Table of Contents

Features

  • User to Movie Recommendations: Get the top 10 movie recommendations for a given user.
  • Movie to User Recommendations: Get the top 10 user recommendations for a given movie.

Installation

  1. Clone the repository:

    git clone https://github.com/YuriPaglierani/Movie-Recommender-System-with-GNNs.git
    cd Movie-Recommender-System-with-GNNs
  2. Create a virtual environment and install dependencies:

     conda env create -f environment.yml
     conda install pytorch-sparse -c pyg 
     conda install pytorch-cluster -c pyg

Usage

  1. Train the model (optional, you need at least 1 GPU):

    python utils/train_test.py
  2. Make recommendations from terminal:

    python utils/recommend.py

Enter the User ID as prompted to get recommendations.

Data

The dataset used is the MovieLens 25M dataset, which includes 25 million user-movie interactions. The data is preprocessed and split into training and testing sets, through the files data/reviews.csv, and data/movies.csv

Model

The model used is LightGCN, which is a Graph Neural Network model tailored for recommendation tasks. It effectively captures collaborative filtering signals by leveraging graph convolutions, for more details you can read the paper "LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation"; to handle the big dataset I integrated LightGCN with the graph sampling technique shown in the paper "Cluster-GCN: An Efficient Algorithm for Training Deep and Large Graph Convolutional Networks"