Home

Awesome

DecodingMatters

This is the raw implementation of our paper Decoding Matters: Addressing Amplification Bias and Homogeneity Issue for LLM-based Recommendation

Reproduce

To reproduce our results, you need to conduct the following pipeline.

# Take the book dataset as an example
# Download the dataset
wget https://datarepo.eng.ucsd.edu/mcauley_group/data/amazon_v2/categoryFiles/Books.json.gz
wget wget https://datarepo.eng.ucsd.edu/mcauley_group/data/amazon_v2/metaFiles2/meta_Books.json.gz
# Unzip
gunzip Books.json.gz
gunzip meta_Books.json.gz
# Preprocess
python ./code/preprocess.py --category "Books"
# Train
bash run.sh  # You only need to change the category parameter in script
# Inference and Evaluate
bash evaluate.sh
# Decoding Matters Inference (Our Methods) and Evaluate
bash evaluate2.sh # You need to specify your logits file in the script

Results and Model

The results and the parameters of Qwen2-0.5B trained on five Amazon datasets are presented in the following table:

DatasetNDCG@10HR@10Link
CDs_and_Vinyl0.0770.109link
Video_Games0.0520.085link
Toys_and_Games0.0530.096link
Sports_and_Outdoors0.0990.120link
Book0.0180.027link

If you're using this code in your research or applications, please cite our paper using this BibTeX:

@article{bao2024decoding,
  title={Decoding Matters: Addressing Amplification Bias and Homogeneity Issue for LLM-based Recommendation},
  author={Bao, Keqin and Zhang, Jizhi and Zhang, Yang and Huo, Xinyue and Chen, Chong and Feng, Fuli},
  journal={arXiv preprint arXiv:2406.14900},
  year={2024}
}

and

@article{bao2023bi,
  title={A bi-step grounding paradigm for large language models in recommendation systems},
  author={Bao, Keqin and Zhang, Jizhi and Wang, Wenjie and Zhang, Yang and Yang, Zhengyi and Luo, Yancheng and Chen, Chong and Feng, Fuli and Tian, Qi},
  journal={arXiv preprint arXiv:2308.08434},
  year={2023}
}