This repository contains our implementations for "Lightweight Denoising and Aligning Multi-modal Recommender System".
- data: The public links to download the datasets and dataset preprocessing methods.
- log_files: The log files to quickly reproduce the reported results.
- src_LDAMRS: The implementation of LDA-MRS on Amazon Baby, Sports and Clothing.
- OS: Ubuntu 20.04.6 LTS
- numpy==1.23.5
- pandas==1.5.3
- python==3.10.9
- scipy==1.10.0
- torch==2.0.0
- pyyaml==6.0
- pyg==2.3.0
- networkx==2.8.4
- tqdm==4.65.0
- lmdb==1.4.0
-
Step 1: Download and pre-process the datasets to folder './data' following the instruction in './data/Readme.md'.
-
Step 2: Run the following command to construct item-item behavior graph.
# construct item-item behavior graph. python -u build_iib_graph.py --dataset=baby --topk=2
There are two parameters:
- dataset: str type, allowed values are baby, sports, clothing, and tiktok.
- topk: int type, parameter for pruning the Item-item behavior graph.
-
Step 3: Specify configurations
-
Enter to the './src_LDAMRS' folder
# enter to the src folder cd src_LDAMRS
-
Specify dataset-specific configurations
vim configs/dataset/xx.yaml
-
Specify model-specific configurations
vim configs/model/xx.yaml
-
Specify the overall configurations
vim configs/overall.yaml
-
Rename the model filename
# when run the lightgcn-ldarms-s cp models/lightgcn-ldarms-s.py models/lightgcn.py # when run the lightgcn-ldarms-d cp models/lightgcn-ldarms-d.py models/lightgcn.py
-
-
Step 4: Run the following command to train and evaluate the model.
# run the code python -u main.py --model=LightGCN --dataset=baby --gpu_id=0
There are three parameters:
-
model: str type, the name of the backbone model, such as LightGCN.
-
dataset: str type, the name of the dataset, such as baby, sports, clothing.
-
gpu_id: str type, the specified GPU.
-
The structure of this code is based on MMRec. Thanks for their work.