File size: 4,701 Bytes
97ce102 6fd438c 97ce102 6fd438c de393c3 6fd438c a781cd1 6fd438c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | ---
license: mit
library_name: pytorch
pipeline_tag: graph-ml
datasets:
- wzehui/Yelp-Multimodal-Recommendation
language:
- en
tags:
- POI
- recommendation
- recommender-system
- GNN
- graph-neural-network
- LightGCN
- contrastive-learning
- yelp
- arxiv:2608.16407
---
# LLM-MGCL: Checkpoints
Trained checkpoints for **LLM-MGCL**, from the paper
[*POI Recommendation with LLM-Augmented Multi-Graph Learning and Contrastive Alignment*](https://arxiv.org/abs/2608.16407)
(Tamer, Höpken, Wang, 2026).
Code: **[GitHub](https://github.com/wwebpy/LLM-MGCL)**
## Model
LLM-MGCL extends LightGCN with two item-item views and aligns them with contrastive learning:
| Graph | Edges | Edge weight |
|---|---|---|
| **G_UI** | user-item training interactions | star rating `(stars − 1) / 4`, clamped at 0.1 |
| **G_SEM** | top-10 most similar items within 50 km | cosine similarity of LLM-generated photo summaries (`all-MiniLM-L6-v2`) |
| **G_GEO** | top-10 nearest items within 50 km | `1 / (1 + distance_km)` (Haversine) |
The three graphs are propagated in parallel with LightGCN (3 / 2 / 2 layers) from shared
64-dimensional ego embeddings, and the item views are fused additively. Training uses BPR,
L2 regularisation (1e-3) and a bidirectional InfoNCE loss between the collaborative view and the
semantic and geographic views (λ = 0.05, τ = 0.2).
## Contents
All models were trained with seeds **42, 123 and 2024**, so there are 3 checkpoints per run.
| Run | Description |
|---|---|
| LLM-MGCL | full model |
| LLM-MGCL w/o CL | ablation: λ = 0 |
| LLM-MGCL w/o G_SEM | ablation: semantic view removed |
| LLM-MGCL w/o G_GEO | ablation: geographic view removed |
| LightGCN, SGL, NGCF, GC-MC, NeuMF, MF-BPR | baselines |
ItemKNN and UserKNN have no weights. The code computes them deterministically.
Each `.pt` file is a dict containing `model_state` (a PyTorch `state_dict`), `model_config` and
`seed`. These are raw PyTorch weights, not a `transformers` model. Load them with the model
classes from the GitHub repository.
## Usage
The checkpoints only work with the graphs and id mappings produced by the repository's
preprocessing, because user and item indices must match. Build them first, then download the
checkpoints and evaluate:
```bash
git clone <GITHUB-URL> && cd llm-mgcl
pip install -e .
python scripts/build_graphs.py # split, id mapping, G_UI / G_SEM / G_GEO
huggingface-cli download bbbur/LLM-MGCL --local-dir hf_checkpoints
python scripts/import_colab_checkpoints.py --src hf_checkpoints
python scripts/compare_models.py # Table 1, ablation, significance tests
python scripts/cold_start.py # cold-start analysis
```
Loading a single model in Python:
```python
from huggingface_hub import hf_hub_download
import torch
from llm_mgcl.models import build_model
from llm_mgcl.pipeline import load_dataset
from llm_mgcl.utils import load_config, get_device
cfg, device = load_config("configs/default.yaml"), get_device()
ds = load_dataset(cfg, device)
path = hf_hub_download("bbbur/LLM-MGCL", "<path/to/llm_mgcl_geo_seed42.pt>")
model = build_model("llm_mgcl", ds.data.n_users, ds.data.n_items, cfg).to(device)
model.load_state_dict(torch.load(path, map_location=device, weights_only=False)["model_state"])
model.eval()
scores = model.scorer(ds.graphs)(torch.tensor([0], device=device)) # [1, n_items]
```
## Training data
[wzehui/Yelp-Multimodal-Recommendation](https://huggingface.co/datasets/wzehui/Yelp-Multimodal-Recommendation).
Users with fewer than 3 reviews are removed. Each user's interactions are split 80 / 10 / 10 into
train / validation / test (`random_state=42`). The models were trained with Adam (lr 1e-3),
StepLR (step 20, γ 0.5) and batch size 2048 for up to 100 epochs. Early stopping is based on
validation Recall@20 (evaluated every 2 epochs, patience 8 evaluations).
## Limitations
* The models are transductive. They only score users and items seen during training, with the
exact id mapping of the preprocessing.
* They were trained and evaluated on Yelp only, and results may not transfer to other cities,
platforms or domains.
## Citation
```bibtex
@article{tamer2026llmmgcl,
title = {POI Recommendation with LLM-Augmented Multi-Graph Learning and Contrastive Alignment},
author = {Tamer, Burak and H{\"o}pken, Wolfram and Wang, Zehui},
journal = {arXiv preprint arXiv:2608.16407},
year = {2026},
eprint = {2608.16407},
archivePrefix = {arXiv},
primaryClass = {cs.IR},
url = {https://arxiv.org/abs/2608.16407}
}
```
## License
MIT. Use of the Yelp data is subject to Yelp's dataset terms. |