揭示大模型推荐中少样本学习的内在机制,提出可优化的推荐生成新方法。
Decoding Recommendation Behaviors of In-Context Learning LLMs Through Gradient Descent
- 将推荐生成建模为梯度下降过程,解释少样本提示为何有效。
- 在三个亚马逊数据集上验证理论等价性,提升推荐系统鲁棒性。
- 适合研究大模型推荐机制或设计高效提示策略的学者使用。
近期,大语言模型(LLM)被广泛应用于推荐系统,称为 LLMRec。其中一种主流方法是不直接微调模型,而是采用针对推荐场景定制的上下文学习(ICL)方法,即 LLM-ICL Rec。尽管现有技术多聚焦于利用 ICL 内容提升性能,但如何优化无微调下的少样本提示仍面临两大挑战:一是缺乏对少量示例为何优于零样本推荐的机理解释;二是缺乏对示例质量的评估指标,且缺少理论分析与生成优化设计。为此,本文提出一个理论模型——LLM-ICL 推荐等价梯度下降模型(LRGD),将推荐生成与梯度下降动态关联。我们证明了在大模型中,ICL 推理过程与其对偶模型的训练过程一致,生成的词元预测等价于对偶模型的测试输出。基于此,我们提出了评估示例质量的指标,并在 LRGD 中引入扰动与正则化以增强系统鲁棒性。为进一步提升示例有效性、防止性能退化并保障长期适应性,我们设计了两阶段优化流程。在三个 Amazon 数据集上的大量实验及详细分析验证了理论等价性,并支持所提理论与模块设计的有效性。
原文摘要 · Abstract (English)
Recently, there has been a growing trend in utilizing large language models (LLMs) for recommender systems, referred to as LLMRec. A notable approach within this trend is not to fine-tune these models directly but instead to leverage In-Context Learning (ICL) methods tailored for LLMRec, denoted as LLM-ICL Rec. Many contemporary techniques focus on harnessing ICL content to enhance LLMRec performance. However, optimizing LLMRec with ICL content presents unresolved challenges. Specifically, two key issues stand out: (1) the limited understanding of why using a few demonstrations without model fine-tuning can lead to better performance compared to zero-shot recommendations. (2) the lack of evaluation metrics for demonstrations in LLM-ICL Rec and the absence of the theoretical analysis and practical design for optimizing the generation of ICL content for recommendation contexts. To address these two main issues, we propose a theoretical model, the LLM-ICL Recommendation Equivalent Gradient Descent model (LRGD) in this paper, which connects recommendation generation with gradient descent dynamics. We demonstrate that the ICL inference process in LLM aligns with the training procedure of its dual model, producing token predictions equivalent to the dual model's testing outputs. Building on these theoretical insights, we propose an evaluation metric for assessing demonstration quality. We integrate perturbations and regularizations in LRGD to enhance the robustness of the recommender system. To further improve demonstration effectiveness, prevent performance collapse, and ensure long-term adaptability, we also propose a two-stage optimization process in practice. Extensive experiments and detailed analysis on three Amazon datasets validate the theoretical equivalence and support the effectiveness of our theoretical analysis and practical module design.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。