Elamur Research⌕
☰
home / papers / 2023 / TALLRec: An Effective and Efficient Tuning Framework to Align Large Language Model with Recommendation

TALLRec: An Effective and Efficient Tuning Framework to Align Large Language Model with Recommendation

Paper · 2023 · Keqin Bao; Jizhi Zhang; Yang Zhang; Wenjie Wang; Fuli Feng; and Xiangnan He

Summary

The paper asks why general-purpose LLMs make poor recommenders when used only through In-context Learning, and how to fix this cheaply. The authors find that models such as ChatGPT and GPT-3 (Davinci) often refuse to answer or predict that the user likes nearly every item, scoring close to random AUC. They argue that LLM pre-training differs too much from recommendation and contains little recommendation-style data. Their proposed framework, TALLRec, recasts user histories as instruction-tuning examples. Each example lists the items a user liked and disliked, plus a target item, and the model must answer "Yes" or "No." Training happens in two stages. First comes general alpaca tuning on Alpaca self-instruct data, then recommendation-specific rec-tuning. Both stages use LoRA on LLaMA-7B, so training fits on a single RTX 3090. In movie and book recommendation tests, the tuned model beats traditional recommenders and GPT-3.5 In-context Learning, even with very few training samples. It also transfers well across domains. This suggests that compact, lightly tuned LLMs can serve as practical recommenders.

Key points

  • With In-context Learning, ChatGPT, Davinci-002/003 and Alpaca reach AUC of only about 0.46–0.53 on movie and book tasks, which is essentially random.
  • The two TALLRec stages are alpaca tuning, which builds general instruction-following, and rec-tuning, which uses binary like/dislike prompts built from item titles and descriptions.
  • The setup is lightweight: LLaMA-7B with LoRA adapters, trainable on one Nvidia RTX 3090 (24GB), with gains already visible using fewer than 100 rec-tuning samples.
  • With small budgets (≤128 samples), the extra alpaca stage helps compared with rec-tuning alone, and this advantage shrinks as more data becomes available.
  • In cross-domain tests, a model tuned only on movies performs about as well on books as a book-tuned model. Training on both domains works best once more than 64 samples are used.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Institutions

 Fields, topics and concepts

Cite

Cite as Keqin Bao; Jizhi Zhang; Yang Zhang; Wenjie Wang; Fuli Feng; and Xiangnan He. 2023. TALLRec: An Effective and Efficient Tuning Framework to Align Large Language Model with Recommendation. arXiv:2305.00447.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.1145/3604915.3608857 · arXiv 2305.00447

@misc{feng2023tallrec,
  title = {{TALLRec: An Effective and Efficient Tuning Framework to Align Large Language Model with Recommendation}},
  author = {Keqin Bao; Jizhi Zhang; Yang Zhang; Wenjie Wang; Fuli Feng; and Xiangnan He},
  year = {2023},
  doi = {10.1145/3604915.3608857},
  eprint = {2305.00447},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1145/3604915.3608857}
}

References

71 references, 18 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Qingyao Ai, Ting Bai, Zhao Cao, Yi Chang, Jiawei Chen, Zhumin Chen, Zhiyong Cheng, Shoubin Dong, Zhicheng Dou, Fuli Feng, et al. 2023. Information Retrieval Meets Large Language Models: A Strategic Report from Chinese IR Community. arXiv preprint arXiv:2307.09751 (2023). — [arXiv:2307.09751](https://arxiv.org/abs/2307.09751) find
  2. Greg Brockman, Mira Murati, Peter Welinder, and OpenAI. 2022. OpenAI API. find
  3. Tom Brown, Benjamin Mann, Nick Ryder, et al. 2020. Language models are few-shot learners. NeurIPS 33 (2020), 1877–1901.
  4. Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, et al. 2022. Palm: Scaling language modeling with pathways. arXiv preprint arXiv:2204.02311 (2022).
  5. Qiang Cui, Shu Wu, Qiang Liu, Wen Zhong, and Liang Wang. 2020. MV-RNN: A Multi-View Recurrent Neural Network for Sequential Recommendation. IEEE Trans. Knowl. Data Eng. 32, 2 (2020), 317–331. find
  6. Zeyu Cui, Jianxin Ma, Chang Zhou, Jingren Zhou, and Hongxia Yang. 2022. M6-Rec: Generative Pretrained Language Models are Open-Ended Recommender Systems. arXiv preprint arXiv:2205.08084 (2022). — [arXiv:2205.08084](https://arxiv.org/abs/2205.08084) find
  7. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. In NAACL. Association for Computational Linguistics, 4171–4186.
  8. Sihao Ding, Fuli Feng, Xiangnan He, Jinqiu Jin, Wenjie Wang, Yong Liao, and Yongdong Zhang. 2022. Interpolative Distillation for Unifying Biased and Debiased Recommendation. In SIGIR ’22, July 11 - 15, 2022. ACM, 40–49. find
  9. Tim Donkers, Benedikt Loepp, and Jürgen Ziegler. 2017. Sequential user-based recurrent neural network recommendations. In Proceedings of the eleventh ACM conference on recommender systems. 152–160. find
  10. Danny Driess, Fei Xia, Mehdi S. M. Sajjadi, et al. 2023. PaLM-E: An Embodied Multimodal Language Model. abs/2303.03378 (2023). arXiv:2303.03378 find
  11. Hui Fang, Danning Zhang, Yiheng Shu, and Guibing Guo. 2020. Deep Learning for Sequential Recommendation: Algorithms, Influential Factors, and Evaluations. ACM Trans. Inf. Syst. 39, 1 (2020), 10:1–10:42. find
  12. F.Maxwell and Joseph A. Konstan. 2015. The MovieLens Datasets: History and Context.. In ACM Transactions on Interactive Intelligent Systems (TiiS). find
  13. Yunfan Gao et al. 2023. Chat-REC: Towards Interactive and Explainable LLMs-Augmented Recommender System. arXiv preprint:2303.14524 (2023). — [arXiv:2303.14524](https://arxiv.org/abs/2303.14524) find
  14. Shijie Geng, Shuchang Liu, Zuohui Fu, Yingqiang Ge, and Yongfeng Zhang. 2022. Recommendation as language processing (rlp): A unified pretrain, personalized prompt & predict paradigm (p5). In Proceedings of the 16th ACM Conference on Recommender Systems. 299–315. find
  15. Ruining He and Julian McAuley. 2016. Fusing similarity models with markov chains for sparse sequential recommendation. In 2016 IEEE 16th international conference on data mining (ICDM). IEEE, 191–200. find
  16. Xiangnan He, Kuan Deng, Xiang Wang, Yan Li, Yongdong Zhang, and Meng Wang. 2020. Lightgcn: Simplifying and powering graph convolution network for recommendation. In SIGIR’20. 639–648. find
  17. Balázs Hidasi et al. 2016. Session-based Recommendations with Recurrent Neural Networks. In ICLR. find
  18. Jordan Hoffmann et al. 2022. Training compute-optimal large language models. arXiv preprint arXiv:2203.15556 (2022).
  19. Yupeng Hou, Shanlei Mu, Wayne Xin Zhao, Yaliang Li, Bolin Ding, and Ji-Rong Wen. 2022. Towards Universal Sequence Representation Learning for Recommender Systems. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining. 585–593. find
  20. Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, et al. 2019. Parameter-Efficient Transfer Learning for NLP. In Proceedings of the 36th International Conference on Machine Learning, ICML 2019, 9-15 June 2019, Vol. 97. 2790–2799. find
  21. Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. 2022. LoRA: Low-Rank Adaptation of Large Language Models. In The Tenth International Conference on Learning Representations, ICLR 2022, Virtual Event, April 25-29, 2022.
  22. Srinivasan Iyer, Xi Victoria Lin, Ramakanth Pasunuru, et al. 2022. OPT-IML: Scaling Language Model Instruction Meta Learning through the Lens of Generalization. arXiv preprint arXiv:2212.12017 (2022).
  23. Joel Jang, Seungone Kim, Seonghyeon Ye, Doyoung Kim, Lajanugen Logeswaran, Moontae Lee, Kyungjae Lee, and Minjoon Seo. 2023. Exploring the Benefits of Training Expert Language Models over Instruction Tuning. (2023). arXiv:2302.03202
  24. Vitor Jeronymo, Luiz Henrique Bonifacio, Hugo Abonizio, Marzieh Fadaee, Roberto de Alencar Lotufo, Jakub Zavrel, and Rodrigo Frassetto Nogueira. 2023. InPars-v2: Large Language Models as Efficient Dataset Generators for Information Retrieval. abs/2301.01820 (2023). arXiv:2301.01820 — [arXiv:2301.01820](https://arxiv.org/abs/2301.01820) find
  25. Matthew Jin, Syed Shahriar, Michele Tufano, Xin Shi, Shuai Lu, Neel Sundaresan, and Alexey Svyatkovskiy. 2023. InferFix: End-to-End Program Repair with LLMs. (2023). arXiv:2303.07263 — [arXiv:2303.07263](https://arxiv.org/abs/2303.07263) find
  26. Wang-Cheng Kang and Julian McAuley. 2018. Self-attentive sequential recommendation. In ICDM. 197–206. find
  27. Yehuda Koren, Robert Bell, and Chris Volinsky. 2009. Matrix factorization techniques for recommender systems. Computer 42, 8 (2009), 30–37. find
  28. Brian Lester, Rami Al-Rfou, and Noah Constant. 2021. The Power of Scale for Parameter-Efficient Prompt Tuning. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, EMNLP,7-11 November, 2021. Association for Computational Linguistics, 3045–3059.
  29. Lei Li, Yongfeng Zhang, and Li Chen. 2023. Personalized prompt learning for explainable recommendation. ACM Transactions on Information Systems 41, 4 (2023), 1–26. find
  30. Ruyu Li, Wenhao Deng, Yu Cheng, Zheng Yuan, Jiaqi Zhang, and Fajie Yuan. 2023. Exploring the Upper Limits of Text-Based Collaborative Filtering Using Large Language Models: Discoveries and Insights. arXiv preprint arXiv:2305.11700 (2023). — [arXiv:2305.11700](https://arxiv.org/abs/2305.11700) find
  31. Xiang Lisa Li and Percy Liang. 2021. Prefix-Tuning: Optimizing Continuous Prompts for Generation. In ACL/IJCNLP 2021, August 1-6, 2021. Association for Computational Linguistics, 4582–4597. find
  32. Percy Liang, Rishi Bommasani, Tony Lee, et al. 2022. Holistic evaluation of language models. arXiv preprint arXiv:2211.09110 (2022). find
  33. Xi Victoria Lin, Todor Mihaylov, et al. 2021. Few-shot learning with multilingual language models. arXiv preprint arXiv:2112.10668 (2021).
  34. Tariq Mahmood and Francesco Ricci. 2007. Learning and adaptivity in interactive recommender systems. In Proceedings of the ninth international conference on Electronic commerce. 75–84. find
  35. Yabo Ni, Dan Ou, Shichen Liu, et al. 2018. Perceive Your Users in Depth: Learning Universal User Representations from Multiple E-commerce Tasks. In KDD 2018, August 19-23, 2018. ACM, 596–605. find
  36. Long Ouyang et al. 2022. Training language models to follow instructions with human feedback. NeurIPS 35 (2022), 27730–27744.
  37. Baolin Peng et al. 2023. Instruction Tuning with GPT-4. (2023). arXiv:2304.03277
  38. Ruihong Qiu, Zi Huang, Hongzhi Yin, and Zijian Wang. 2021. Contrastive Learning for Representation Degeneration Problem in Sequential Recommendation. (2021). arXiv:2110.05730 — [arXiv:2110.05730](https://arxiv.org/abs/2110.05730) find
  39. Ruihong Qiu, Zi Huang, Hongzhi Yin, and Zijian Wang. 2022. Contrastive Learning for Representation Degeneration Problem in Sequential Recommendation. In WSDM ’22: The Fifteenth ACM International Conference on Web Search and Data Mining, February 21 - 25, 2022. ACM, 813–823. find
  40. Steffen Rendle, Christoph Freudenthaler, and Lars Schmidt-Thieme. 2010. Factorizing personalized markov chains for next-basket recommendation. In Proceedings of the 19th international conference on World wide web. 811–820. find
  41. Victor Sanh, Albert Webson, Colin Raffel, et al. 2021. Multitask prompted training enables zero-shot task generalization. arXiv:2110.08207 (2021).
  42. Timo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu, Maria Lomeli, Luke Zettlemoyer, Nicola Cancedda, and Thomas Scialom. 2023. Toolformer: Language models can teach themselves to use tools. arXiv preprint arXiv:2302.04761 (2023).
  43. Dhruv Shah, Blazej Osinski, Brian Ichter, and Sergey Levine. 2022. LM-Nav: Robotic Navigation with Large Pre-Trained Models of Language, Vision, and Action. In CoRL 2022, 14-18 December 2022 (Proceedings of Machine Learning Research, Vol. 205). PMLR, 492–504. find
  44. Jiaxi Tang and Ke Wang. 2018. Personalized top-n sequential recommendation via convolutional sequence embedding. In WSDM. 565–573. find
  45. Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. 2023. Stanford Alpaca: An Instruction-following LLaMA model. find
  46. Hugo Touvron et al. 2023. LlaMA: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971 (2023).
  47. Lei Wang et al. 2023. Zero-Shot Next-Item Recommendation using Large Pre-trained Language Models. arXiv preprint arXiv:2304.03153 (2023). — [arXiv:2304.03153](https://arxiv.org/abs/2304.03153) find
  48. Liang Wang, Nan Yang, and Furu Wei. 2023. Query2doc: Query Expansion with Large Language Models. (2023). arXiv:2303.07678
  49. Pengfei Wang, Jiafeng Guo, Yanyan Lan, Jun Xu, Shengxian Wan, and Xueqi Cheng. 2015. Learning hierarchical representation model for nextbasket recommendation. In Proceedings of the 38th International ACM SIGIR conference on Research and Development in Information Retrieval. 403–412. find
  50. Shoujin Wang, Liang Hu, Yan Wang, Longbing Cao, Quan Z. Sheng, and Mehmet A. Orgun. 2019. Sequential Recommender Systems: Challenges, Progress and Prospects. In IJCAI 2019, Macao, China, August 10-16, 2019. ijcai.org, 6332– 6338. find
  51. Ziyang Wang, Huoyu Liu, Wei Wei, Yue Hu, Xian-Ling Mao, Shaojian He, Rui Fang, and Dangyang Chen. 2022. Multi-level Contrastive Learning Framework for Sequential Recommendation. (2022). arXiv:2208.13007 — [arXiv:2208.13007](https://arxiv.org/abs/2208.13007) find
  52. Zhenlei Wang, Shiqi Shen, Zhipeng Wang, Bo Chen, Xu Chen, and Ji-Rong Wen. 2022. Unbiased Sequential Recommendation with Latent Confounders. In WWW ’22: The ACM Web Conference 2022, Virtual Event, Lyon, France, April 25 - 29, 2022. ACM, 2195–2204. find
  53. Jason Wei, Maarten Bosma, Vincent Y Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M Dai, and Quoc V Le. 2021. Finetuned language models are zero-shot learners. arXiv preprint arXiv:2109.01652 (2021).
  54. Jason Wei, Yi Tay, Rishi Bommasani, et al. 2022. Emergent abilities of large language models. arXiv preprint arXiv:2206.07682 (2022).
  55. Hongyi Wen, Xinyang Yi, Tiansheng Yao, Jiaxi Tang, Lichan Hong, and Ed H. Chi. 2022. Distributionally-robust Recommendations for Improving Worst-case User Experience. In WWW ’22: The ACM Web Conference 2022, Virtual Event, Lyon, France, April 25 - 29, 2022. ACM, 3606–3610. find
  56. Ted Xiao, Harris Chan, Pierre Sermanet, Ayzaan Wahid, Anthony Brohan, Karol Hausman, Sergey Levine, and Jonathan Tompson. 2022. Robotic Skill Acquisition via Instruction Augmentation with Vision-Language Models. abs/2211.11736 (2022). arXiv:2211.11736 — [arXiv:2211.11736](https://arxiv.org/abs/2211.11736) find
  57. Xu Xie, Fei Sun, Zhaoyang Liu, Shiwen Wu, Jinyang Gao, Jiandong Zhang, Bolin Ding, and Bin Cui. 2022. Contrastive Learning for Sequential Recommendation. In 38th IEEE International Conference on Data Engineering, ICDE 2022, Kuala Lumpur, Malaysia, May 9-12, 2022. IEEE, 1259–1273. find
  58. Chengfeng Xu, Jian Feng, Pengpeng Zhao, Fuzhen Zhuang, Deqing Wang, Yanchi Liu, and Victor S. Sheng. 2021. Long- and short-term self-attention network for sequential recommendation. Neurocomputing 423 (2021), 580–589. find
  59. An Yan, Shuo Cheng, Wang-Cheng Kang, Mengting Wan, and Julian J. McAuley. 2019. CosRec: 2D Convolutional Neural Networks for Sequential Recommendation. In CIKM 2019, November 3-7, 2019. ACM, 2173–2176. find
  60. Zhengyi Yang et al. 2023. A Generic Learning Framework for Sequential Recommendation with Distribution Shifts. (2023). find
  61. Fajie Yuan, Xiangnan He, Alexandros Karatzoglou, and Liguang Zhang. 2020. Parameter-Efficient Transfer from Sequential Behaviors for User Modeling and Recommendation. In SIGIR 2020, July 25-30, 2020. ACM, 1469–1478. find
  62. Fajie Yuan, Alexandros Karatzoglou, Ioannis Arapakis, Joemon M. Jose, and Xiangnan He. 2019. A Simple Convolutional Generative Network for Next Item Recommendation. In WSDM 2019, February 11-15, 2019. ACM, 582–590. find
  63. Zheng Yuan, Fajie Yuan, Yu Song, Youhua Li, Junchen Fu, Fei Yang, Yunzhu Pan, and Yongxin Ni. 2023. Where to Go Next for Recommender Systems? ID-vs. Modality-based Recommender Models Revisited. In Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information R… find
  64. Jizhi Zhang, Keqin Bao, Yang Zhang, Wenjie Wang, Fuli Feng, and Xiangnan He. 2023. Is chatgpt fair for recommendation? evaluating fairness in large language model recommendation. In Proceedings of the 17th ACM Conference on Recommender Systems (RecSys ’23). Association for Computing Machinery. find
  65. Tingting Zhang, Pengpeng Zhao, Yanchi Liu, et al. 2019. Feature-level Deeper Self-Attention Network for Sequential Recommendation. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI 2019, August 10-16, 2019. ijcai.org, 4320–4326. find
  66. Yang Zhang et al. 2023. Reformulating CTR Prediction: Learning Invariant Feature Interactions for Recommendation. (2023). find
  67. Yang Zhang, Fuli Feng, Xiangnan He, Tianxin Wei, Chonggang Song, Guohui Ling, and Yongdong Zhang. 2021. Causal Intervention for Leveraging Popularity Bias in Recommendation. In SIGIR ’21, July 11-15, 2021. ACM, 11–20. find
  68. Zizhuo Zhang and Bang Wang. 2023. Prompt Learning for News Recommendation. arXiv preprint arXiv:2304.05263 (2023). — [arXiv:2304.05263](https://arxiv.org/abs/2304.05263) find
  69. Wayne Xin Zhao, Kun Zhou, Junyi Li, Tianyi Tang, Xiaolei Wang, Yupeng Hou, Yingqian Min, Beichen Zhang, Junjie Zhang, Zican Dong, Yifan Du, Chen Yang, Yushuo Chen, Zhipeng Chen, Jinhao Jiang, Ruiyang Ren, Yifan Li, Xinyu Tang, Zikang Liu, Peiyu Liu, Jian-Yun Nie, and Ji-Rong Wen. 2023. A Survey of L…
  70. Yu Zheng et al. 2021. Disentangling User Interest and Conformity for Recommendation with Causal Embedding. In WWW ’21. 2980–2991. find
  71. Cai-Nicolas Ziegler, Sean M. McNee, Joseph A. Konstan, and Georg Lausen. 2005. Improving Recommendation Lists through Topic Diversification. In Proceedings of the 14th International Conference on World Wide Web (WWW ’05). Association for Computing Machinery, 22–32. find

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/bao-2023-tallrec-effective-efficient-tuning-framework/