This is the official implementation for the ACL 2025 paper: "GRAM: Generative Recommendation via Semantic-aware Multi-granular Late Fusion".
GRAM (Generative Recommender via semantic-Aware Multi-granular late fusion) is a novel generative recommendation system that effectively translates item relationships into LLM's vocabulary space and efficiently processes rich metadata through multi-granular late fusion.
- 📄 Paper: ACL Anthology | arXiv
- 🎨 Presentation: Poster | Slides
- 📝 Blog Post: Korean
- Python: 3.9+
- PyTorch: 1.11.0
- Transformers: 4.26.0
- CUDA: 11.3
- Clone the repository
git clone https://github.com/skleee/GRAM.git
cd GRAM
- Create conda environment
conda create -n gram python=3.9
conda activate gram
- Install dependencies
# Install general dependencies
pip install -r requirements.txt
# Install PyTorch with CUDA support
pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0 \
--extra-index-url https://download.pytorch.org/whl/cu113
We evaluate GRAM on 4 datasets from two domains:
- Product reviews from Amazon with rich metadata
- Beauty: Cosmetics and personal care products
- Toys: Children's toys and gaming products
- Sports: Sports equipment and outdoor gear
- Yelp: Local business reviews and ratings
- Amazon Review: Official Dataset
- Yelp: Official Dataset
- Preprocessed Data: Available in
rec_datasets/
directory For more details on the dataset structure, please refer to README.md in therec_datasets/
directory.
Execute the training scripts located in the command/
folder:
# Amazon Beauty dataset
bash train_gram_beauty.sh
# Amazon Toys dataset
bash train_gram_toys.sh
# Amazon Sports dataset
bash train_gram_sports.sh
# Yelp dataset
bash train_gram_yelp.sh
Note: Semantic-to-lexical translation preprocessing scripts will be released soon.
This work builds upon several open-source projects:
- IDGenRec: Generative recommendation framework
- OpenP5: Open-source P5 implementation
- FiD: Fusion-in-Decoder architecture
We sincerely thank the authors for sharing their valuable implementations.
If you find this work helpful, please consider citing our paper:
@inproceedings{lee2025gram,
title = {{GRAM}: Generative Recommendation via Semantic-aware Multi-granular Late Fusion},
author = {Sunkyung Lee and Minjin Choi and Eunseong Choi and Hye-young Kim and Jongwuk Lee},
booktitle = {Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (ACL)},
pages = {33294--33312},
year = {2025},
url = {https://aclanthology.org/2025.acl-long.1596/}
}