用分块嵌入让大模型高效记住用户长期行为
Multi-Grained Patch Training for Efficient LLM-based Recommendation
- 将用户行为分块生成嵌入,压缩历史信息
- 在大模型中训练后,能有效捕捉长期行为模式
- 适合需要长序列推荐的场景,如电商、视频
大型语言模型(LLM)通过将用户交互历史转化为语言建模任务,成为推荐系统的新范式。然而,受限于上下文长度,现有方法只能截取近期交互,牺牲了对长期历史的建模能力。为实现长历史建模,我们提出一种简洁的物品与会话嵌入表示:在LLM嵌入空间中,通过聚合物品文本令牌嵌入构建物品嵌入,再通过聚合物品嵌入构建会话嵌入。该方法虽高效,但存在两个挑战:忽略用户交互的时间重要性,且LLM无法原生理解自定义嵌入。为此,我们提出PatchRec,包含两阶段训练:(1) 分块预训练,使LLM熟悉聚合嵌入(即“分块”);(2) 分块微调,使LLM能捕捉交互历史中的时序重要性。大量实验表明,PatchRec在提升效率的同时,显著增强了对长行为序列的建模能力,推动了大模型在长序列推荐中的实际应用。代码已开源。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have emerged as a new paradigm for recommendation by converting interacted item history into language modeling. However, constrained by the limited context length of LLMs, existing approaches have to truncate item history in the prompt, focusing only on recent interactions and sacrificing the ability to model long-term history. To enable LLMs to model long histories, we pursue a concise embedding representation for items and sessions. In the LLM embedding space, we construct an item's embedding by aggregating its textual token embeddings; similarly, we construct a session's embedding by aggregating its item embeddings. While efficient, this way poses two challenges since it ignores the temporal significance of user interactions and LLMs do not natively interpret our custom embeddings. To overcome these, we propose PatchRec, a multi-grained patch training method consisting of two stages: (1) Patch Pre-training, which familiarizes LLMs with aggregated embeddings -- patches, and (2) Patch Fine-tuning, which enables LLMs to capture time-aware significance in interaction history. Extensive experiments show that PatchRec effectively models longer behavior histories with improved efficiency. This work facilitates the practical use of LLMs for modeling long behavior histories. Codes are available at https://github.com/ljy0ustc/PatchRec.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。