This repository contains the implementation of HDRec (WSDM 2026), a framework designed to enhance Large Language Model (LLM) based recommendation through hybrid dual-semantics modeling.
We recommend using Conda to manage your environment. You can set up the environment directly using the provided hdrec.yml file:
# Create the environment from the yml file
conda env create -f hdrec.yml
# Activate the environment
conda activate hdrec
- Download Raw Data: Obtain the original datasets from Amazon Product Data.
- Preprocessing: Run the following script to process the data into the required format:
python ./src/data/process_data_18.py- Storage: Place the processed files in the
./data/folder.
Download the backbone model from Hugging Face:
We use RecBole to generate traditional collaborative filtering embeddings (e.g., SASRec).
- Train your preferred model (e.g., SASRec) using RecBole.
- Extract the embeddings and save them to:
./temp/SASRec/
To start the training pipeline and run evaluations, use the provided shell script:
chmod +x run.sh
./run.sh
If you find this work helpful, please cite our paper:
@inproceedings{liu2026hybrid,
title={Hybrid Dual-Semantics Modeling for Enhancing Large Language Model Based Recommendation},
author={Liu, Canyi and Li, Tianyi and Li, Wei and Zhang, Youchen and Li, Xiaodong and Li, Hui},
booktitle={Proceedings of the Nineteenth ACM International Conference on Web Search and Data Mining (WSDM)},
pages={396--405},
year={2026},
publisher={ACM}
}