[论文解读] LlamaRec: Two-Stage Recommendation using Large Language Models for Ranking
LlamaRec 将快速检索阶段与基于 LLM 的排序阶段结合,使用一个 verbalizer 来高效地对 top-k 候选项进行排序,性能优越且推理速度比基于生成的基线更快。
Recently, large language models (LLMs) have exhibited significant progress in language understanding and generation. By leveraging textual features, customized LLMs are also applied for recommendation and demonstrate improvements across diverse recommendation scenarios. Yet the majority of existing methods perform training-free recommendation that heavily relies on pretrained knowledge (e.g., movie recommendation). In addition, inference on LLMs is slow due to autoregressive generation, rendering existing methods less effective for real-time recommendation. As such, we propose a two-stage framework using large language models for ranking-based recommendation (LlamaRec). In particular, we use small-scale sequential recommenders to retrieve candidates based on the user interaction history. Then, both history and retrieved items are fed to the LLM in text via a carefully designed prompt template. Instead of generating next-item titles, we adopt a verbalizer-based approach that transforms output logits into probability distributions over the candidate items. Therefore, the proposed LlamaRec can efficiently rank items without generating long text. To validate the effectiveness of the proposed framework, we compare against state-of-the-art baseline methods on benchmark datasets. Our experimental results demonstrate the performance of LlamaRec, which consistently achieves superior performance in both recommendation performance and efficiency.
研究动机与目标
- 在解决实时推理约束的同时,推动在推荐场景中使用 LLM。
- 提出一个结合检索与基于 LLM 的排序的两阶段框架。
- 证明一个 verbalizer 能在无需自回归生成的情况下实现快速、单次前向评分。
提出的方法
- 使用 LRURec 作为检索模块,从用户历史中产生 top-k 候选项目。
- 使用包含历史和候选标题的指令模板,为 Llama 2 排序器构建基于文本的输入。
- 应用一个 verbalizer 将 LLM 的头部对候选索引字母的对数映射到排序分数,而不生成长文本。
- 使用 QLoRA 量化,对 Llama 2 排序器在提示的回复部分进行指令微调。
- 通过对标签标记(索引字母和 EOS)使用类似下一个令牌的损失,训练以最大化真实项分数。
- 为提高效率,将输入长度和候选项限制为各自的前 20 项,历史记录最多为 20 条。
实验结果
研究问题
- RQ1两阶段框架是否能在基于 LLM 的推荐中同时提升检索和排序性能?
- RQ2基于 verbalizer 的排序方法相对于基于生成的排序在效率上是否有提升?
- RQ3在标准顺序推荐基准上,LlamaRec 相较于最先进的基线表现如何?
主要发现
- LlamaRec 在多个数据集上在 MRR、NDCG、Recall 等指标上优于基线方法。
- 最大提升出现在 ML-100k 数据集,在 MRR@5、NDCG@5 和 Recall@5 上有显著提升。
- 在有效检索子集内,LlamaRec 的绝对提升大于在完整评估中,表明对真正相关项目的排序更有效。
- 与 Beauty 上的其他基于 LLM 的基线相比,LlamaRec 在各指标上取得显著性能提升(平均约 14.31%)。
- verbalizer 方法在推理效率方面带来显著提升,使单次前向传播即可对所有候选项进行评分,而基于生成的方法需要较长的解码时间。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。