MRLib is an open-source, research-oriented library for multimodal recommendation.
δΈζζζ‘£: π¨π³ δΈζη
- [2026.05]π―[Update]: We have added MSCA (accepted at WWW 2026) to MRLib, thanks to @recomall.
- [2026.04]π―[Update]: We release the MRLib as a comprehensive benchmark and code base for mutlimodal recommendations.
- Zero Configuration: Automatically scans
*_feat.npyand*_feat.ptfiles - Flexible Integration: Supports visual, textual, audio, and other modalities
- Dynamic Loading: Loads only available modalities per dataset
- Model-Specific Cache: Dedicated cache directory per model
- Parameter Validation: Verifies cache parameters match configuration
- Metadata Management: Stores graph construction parameters
- Training Metrics: Live plots of loss, and metrics
- Best Model Tracking: Auto-identifies best epoch
- Latest SOTA: Regular integration from top venues
- Active Maintenance: Bug fixes and optimizations
- Community Driven: Welcoming contributions
- Amazon Datasets: Baby, Sports, Clothing, Pet, Office, Toys, Beauty and etc.
- Video Datasets: TikTok and Microlens
- Custom Datasets: Clear format specifications
Sorted by publication year. Reference: Awesome-Multimodal-Recommender-Systems
| # | Model | Full Paper Title | Venue | Year | Link |
|---|---|---|---|---|---|
| 1 | VBPR | VBPR: Visual Bayesian Personalized Ranking from Implicit Feedback | AAAI | 2016 | link |
| 2 | MMGCN | MMGCN: Multi-modal Graph Convolution Network for Personalized Recommendation of Micro-video | ACM MM | 2019 | link |
| 3 | GRCN | Graph-Refined Convolutional Network for Multimedia Recommendation with Implicit Feedback | ACM MM | 2020 | link |
| 4 | LATTICE | Mining Latent Structures for Multimedia Recommendation | ACM MM | 2021 | link |
| 5 | DualGNN | DualGNN: Dual Graph Neural Network for Multimedia Recommendation | IEEE TMM | 2021 | link |
| 6 | SLMRec | Self-Supervised Learning for Multimedia Recommendation | IEEE TMM | 2022 | link |
| 7 | BM3 | Bootstrap Latent Representations for Multi-modal Recommendation | WWW | 2023 | link |
| 8 | MMSSL | Multi-Modal Self-Supervised Learning for Recommendation | WWW | 2023 | link |
| 9 | FREEDOM | A Tale of Two Graphs: Freezing and Denoising Graph Structures for Multimodal Recommendation | ACM MM | 2023 | link |
| 10 | MGCN | Multi-View Graph Convolutional Network for Multimedia Recommendation | ACM MM | 2023 | link |
| 11 | DRAGON | Enhancing Dyadic Relations with Homogeneous Graphs for Multimodal Recommendation | ECAI | 2023 | link |
| 12 | LGMRec | LGMRec: Local and Global Graph Learning for Multimodal Recommendation | AAAI | 2024 | link |
| 13 | DiffMM | DiffMM: Multi-Modal Diffusion Model for Recommendation | ACM MM | 2024 | link |
| 14 | DAMRS | Improving Multi-modal Recommender Systems by Denoising and Aligning Multi-modal Content and User Feedback | KDD | 2024 | link |
| 15 | MENTOR | MENTOR: Multi-level Self-supervised Learning for Multimodal Recommendation | AAAI | 2025 | link |
| 16 | PGL | Mind Individual Information! Principal Graph Learning for Multimedia Recommendation | AAAI | 2025 | link |
| 17 | SMORE | Spectrum-based Modality Representation Fusion Graph Convolutional Network for Multimodal Recommendation | WSDM | 2025 | link |
| 18 | COHESION | COHESION: Composite Graph Convolutional Network with Dual-Stage Fusion for Multimodal Recommendation | SIGIR | 2025 | link |
| 19 | SSR | Structured Spectral Reasoning for Frequency-Adaptive Multimodal Recommendation | NeurIPS | 2025 | link |
| 20 | HPMRec | Hypercomplex Prompt-aware Multimodal Recommendation | CIKM | 2025 | link |
| 21 | LOBSTER | LOBSTER: Bilateral global semantic enhancement for multimedia recommendation | Information Fusion | 2026 | link |
| 22 | MSCA | Multi-view Semantic Contrastive Alignment for Multimodal Recommendation | WWW | 2026 | link |
Models sorted by publication year. Table continuously updated with latest research.
# Clone repository
git clone https://github.com/Jinfeng-Xu/Multimodal-Recommendation-Library
cd Multimodal-Recommendation-Library# Run with default settings
python src/main.py -m HPMRec -d baby
# Specify GPU
python src/main.py -m COHESION -d sports --gpu_id 1
# Disable visualization
python src/main.py -m FREEDOM -d clothing --no-visModels configured via YAML files in src/configs/model/:
# HPMRec.yaml
embedding_size: 64
feat_embed_dim: 64
n_mm_layers: 1
n_layers: [3]
knn_k: 10
mm_image_weight: 0.1
reg_weight: [0.001]
hyper_parameters: ["n_layers", "reg_weight"]data/
βββ {dataset_name}/
βββ inter.csv # User-item interactions
βββ visual_feat.npy # Visual features (optional)
βββ textual_feat.npy # Text features (optional)
βββ *_feat.npy # Other features (optional)
user_id,item_id,rating,label
0,123,5,1
1,456,4,1
2,789,5,1- Format:
.npyor.pt(PyTorch tensor) - Shape:
[num_items, feature_dim] - Naming:
{modality}_feat.{npy|pt}
Automatic discovery supports:
visual_feat,image_feat- Any custom
*_feat.npyfiles
MRS/
βββ src/
β βββ main.py # Entry point
β βββ models/ # Model implementations
β β βββ hpmrec.py
β β βββ cohesion.py
β β βββ ...
β βββ utils/
β β βββ graph_cache.py # Graph caching
β β βββ dataset.py # Data processing
β β βββ dataloader.py # Data loading
β β βββ visualization.py # Training visualization
β β βββ quick_start.py # Quick start utility
β βββ configs/
β β βββ model/ # Model configurations
β βββ log/ # Training logs & visualizations
βββ data/ # Datasets
β βββ cache/ # Graph caches
π Performance Benchmarks (Log)
| Model | Recall@10 | Recall@20 | NDCG@10 | NDCG@20 | Training Time | Inference Time |
|---|---|---|---|---|---|---|
| VBPR | 0.0372 | 0.0592 | 0.0199 | 0.0256 | 0.36s/epoch | 0.63s/epoch |
| MMGCN | 0.0414 | 0.0682 | 0.0215 | 0.0284 | 2.18s/epoch | 0.62s/epoch |
| GRCN | 0.0493 | 0.0790 | 0.0258 | 0.0334 | 1.47s/epoch | 0.58s/epoch |
| LATTICE | 0.0584 | 0.0893 | 0.0314 | 0.0393 | 0.72s/epoch | 0.59s/epoch |
| DualGNN | 0.0367 | 0.0592 | 0.0192 | 0.0250 | 4.43s/epoch | 0.59s/epoch |
| SLMRec | 0.0518 | 0.0774 | 0.0287 | 0.0353 | 2.33s/epoch | 0.60s/epoch |
| BM3 | 0.0536 | 0.0856 | 0.0289 | 0.0371 | 0.61s/epoch | 0.58s/epoch |
| MMSSL | 0.0559 | 0.0889 | 0.0306 | 0.0391 | 4.64s/epoch | 0.61s/epoch |
| FREEDOM | 0.0622 | 0.0977 | 0.0337 | 0.0427 | 0.77s/epoch | 0.59s/epoch |
| MGCN | 0.0629 | 0.0964 | 0.0346 | 0.0433 | 1.15s/epoch | 0.60s/epoch |
| DRAGON | 0.0637 | 0.1004 | 0.0351 | 0.0445 | 4.48s/epoch | 0.67s/epoch |
| LGMRec | 0.0652 | 0.1031 | 0.0353 | 0.0450 | 1.47s/epoch | 0.60s/epoch |
| DiffMM | 0.0578 | 0.0900 | 0.0314 | 0.0397 | 0.91s/epoch | 0.60s/epoch |
| DAMRS | 0.0578 | 0.0924 | 0.0316 | 0.0406 | 2.56s/epoch | 0.58s/epoch |
| MENTOR | π₯0.0670 | π₯0.1048 | π₯0.0362 | π₯0.0459 | 5.70s/epoch | 0.59s/epoch |
| PGL | 0.0610 | 0.0960 | 0.0325 | 0.0415 | 0.88s/epoch | 0.59s/epoch |
| SMORE | π₯0.0678 | 0.1039 | π₯0.0368 | π₯0.0460 | 1.39s/epoch | 0.67s/epoch |
| COHESION | π₯0.0670 | π₯0.1050 | 0.0350 | 0.0447 | 4.53s/epoch | 0.59s/epoch |
| SSR | π₯0.0665 | π₯0.1065 | 0.0357 | π₯0.0460 | 9.80s/epoch | 0.81s/epoch |
| HPMRec | 0.0660 | 0.1024 | π₯0.0360 | π₯0.0453 | 6.15s/epoch | 2.07s/epoch |
| LOBSTER | 0.0551 | 0.0861 | 0.0296 | 0.0376 | 1.39s/epoch | 0.61s/epoch |
π The results for the other datasets are comming soon
Default evaluation metrics include: Recall@N and NDCG@N with N = 10 or 20. Whole settings include:
- Recall, NDCG, Precision, MAP
- @5, @10, @20, @50
- Create model file in
src/models/ - Inherit from
GeneralRecommender - Implement required methods:
__init__(self, config, dataloader)forward(self, interaction)calculate_loss(self, interaction)full_sort_predict(self, interaction)
- Add configuration YAML
- Create model file in
src/models/ - Inherit from
GeneralRecommender - Implement required methods:
__init__(self, config, dataloader)forward(self, interaction)calculate_loss(self, interaction)full_sort_predict(self, interaction)
- Add configuration YAML
from utils.graph_cache import GraphCacheManager
# Initialize
cache_manager = GraphCacheManager(data_path, dataset_name)
# Save graph
cache_manager.save_graph(
model_name='MyModel',
graph_name='item_graph',
graph_data=graph_tensor,
metadata={'knn_k': 10}
)
# Load graph
graph_data, metadata = cache_manager.load_graph(
model_name='MyModel',
graph_name='item_graph'
)from utils.visualization import TrainingVisualizer
visualizer = TrainingVisualizer(
model_name='HPMRec',
dataset='baby',
enable=True
)
# Log metrics
visualizer.log_epoch(epoch, loss, recall, ndcg)
# Save final plots
visualizer.save_plots()We welcome contributions!
You can directly propose a pull request and add detailed descriptions to the comment
If you want to add your model to MRLib, please
- Follow existing code style
- Update documentation
If you use MRS in your research, please cite our survey [TMM2026] MRS Survey
@article{xu2026survey,
title={A survey on multimodal recommender systems: Recent advances and future directions},
author={Xu, Jinfeng and Chen, Zheyu and Yang, Shuo and Li, Jinze and Wang, Wei and Hu, Xiping and Hoi, Steven and Ngai, Edith},
journal={IEEE Transactions on Multimedia},
year={2026},
publisher={IEEE}
}MIT License - see LICENSE file for details.
- Paper list reference: Awesome-Multimodal-Recommender-Systems
- The structure of this code is based on MMRec
- Issues: Open an Issue on GitHub
- Discussion: GitHub Discussions
