From Token to Item: Enhancing Large Language Models for Recommendation via Item-aware Attention Mechanism
Xiaokun Zhang, Bowei He, Jiamin Chen, Ziqiang Cui, Chen Ma
Abstract
Large Language Models (LLMs) have recently gained increasing attention in the field of recommendation. Existing LLM-based methods typically represent items as token sequences, and apply attention layers on these tokens to generate recommendations. However, by inheriting the standard attention mechanism, these methods focus on modeling token-level relations. This token-centric focus overlooks the item as the fundamental unit of recommendation, preventing existing methods from effectively capturing collaborative relations at the item level. In this work, we revisit the role of tokens in LLM-driven recommendation and categorize their relations into two types: (1) intra-item token relations, which present the content semantics of an item, e.g., name, color, and size; and (2) inter-item token relations, which encode collaborative relations across items. Building on these insights, we propose a novel framework with an item-aware attention mechanism (IAM) to enhance LLMs for recommendation. Specifically, IAM devises two complementary attention layers: (1) an intra-item attention layer, which restricts attention to tokens within the same item, modeling item content semantics; and (2) an inter-item attention layer, which attends exclusively to token relations across items, capturing item collaborative relations. Through this stacked design, IAM explicitly emphasizes items as the fundamental units in recommendation, enabling LLMs to effectively exploit item-level collaborative relations. Extensive experiments on several public datasets demonstrate the effectiveness of IAM in enhancing LLMs for personalized recommendation. CCS Concepts • Information systems → Recommender systems.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext a2748e8e-017b-4f3a-a6f6-98c99a27f057Cited by top-tier papers1
Ask how each one uses itBuilds on22
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
- Representation Learning with Large Language Models for RecommendationXubin Ren, Wei Wei, Lianghao Xia, Lixin Su et al.WWW 2024 · 385 citations
- Collaborative Large Language Model for Recommender SystemsYaochen Zhu, Liang Wu, Qi Guo, Liangjie Hong et al.WWW 2024 · 150 citations
- Adapting Large Language Models by Integrating Collaborative Semantics for RecommendationBowen Zheng, Yupeng Hou, Hongyu Lu, Yu Chen et al.ICDE 2024 · 132 citations
Related papers
- Token-level Collaborative Alignment for LLM-based Generative RecommendationFake Lin, Binbin Hu, Zhi Zheng, Xi Zhu et al.WWW 2026 · 1 citation
- Semantic Convergence: Harmonizing Recommender Systems via Two-Stage Alignment and Behavioral Semantic TokenizationGuanghan Li, Xun Zhang, Yufei Zhang, Yifan Yin et al.AAAI 2025 · 18 citations
- Improving LLMs for Recommendation with Out-Of-Vocabulary TokensTing-Ji Huang, Jia-Qi Yang, Chunxu Shen, Kai-Qi Liu et al.ICML 2025
- LEARN: Knowledge Adaptation from Large Language Model to Recommendation for Practical Industrial ApplicationJian Jia, Yipei Wang, Yan Li, Honggang Chen et al.AAAI 2025 · 37 citations
- IDGenRec: LLM-RecSys Alignment with Textual ID LearningJuntao Tan, Shuyuan Xu, Wenyue Hua, Yingqiang Ge et al.SIGIR 2024 · 45 citations
