arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2504.04178cs.IR
收藏

MSL:并非所有 Token 都是将 LLM 微调为推荐器所需的

MSL: Not All Tokens Are What You Need for Tuning LLM as a Recommender

Bohao Wang, Feng Liu, Jiawei Chen, Xingyu Lou, Changwang Zhang, Jun Wang, Yuegang Sun, Yan Feng, Chun Chen, Can Wang

AI总结:

本文针对 LLM 推荐微调中 LML 与目标不一致及错误负样本问题,提出 MSL 掩码无效 token,并结合 ATS 缓解梯度消失,在四个数据集上显著提升推荐性能。

摘要:

大型语言模型(LLM)以其理解能力和广泛知识而闻名,并已越来越多地应用于推荐系统(RS)。鉴于 LLM 的机制与推荐系统需求之间存在根本性差距,研究人员一直专注于使用推荐专用数据微调 LLM,以提升其性能。语言建模损失(LML)最初是为语言生成任务设计的,目前被广泛采用。然而,我们发现 LML 存在两个关键局限:1)它与推荐目标表现出显著差异;2)它错误地将所有虚构的物品描述视为负样本,从而引入具有误导性的训练信号。为解决这些局限,我们提出了一种新颖的掩码 Softmax 损失(MSL),专为在推荐任务上微调 LLM 而设计。MSL 通过在损失计算过程中识别并掩码可能导致虚构物品描述的无效 token 来改进 LML。该策略能够有效避免错误负信号的干扰,并在理论保证的支持下确保与推荐目标良好对齐。在实现过程中,我们发现了一个与 MSL 梯度消失相关的潜在挑战。为克服这一问题,我们进一步引入温度系数,并提出自适应温度策略(ATS),该策略可自适应地调整温度,而无需大量超参数调优。在四个公开数据集上进行的大量实验进一步验证了 MSL 的有效性,其在 NDCG@10 上实现了 42.24% 的平均提升。代码可在 https://github.com/WANGBohaO-jpg/MSL 获取。

英文摘要:

Large language models (LLMs), known for their comprehension capabilities and extensive knowledge, have been increasingly applied to recommendation systems (RS). Given the fundamental gap between the mechanism of LLMs and the requirement of RS, researchers have focused on fine-tuning LLMs with recommendation-specific data to enhance their performance. Language Modeling Loss (LML), originally designed for language generation tasks, is commonly adopted. However, we identify two critical limitations of LML: 1) it exhibits significant divergence from the recommendation objective; 2) it erroneously treats all fictitious item descriptions as negative samples, introducing misleading training signals. To address these limitations, we propose a novel Masked Softmax Loss (MSL) tailored for fine-tuning LLMs on recommendation. MSL improves LML by identifying and masking invalid tokens that could lead to fictitious item descriptions during loss computation. This strategy can effectively avoid the interference from erroneous negative signals and ensure well alignment with the recommendation objective supported by theoretical guarantees. During implementation, we identify a potential challenge related to gradient vanishing of MSL. To overcome this, we further introduce the temperature coefficient and propose an Adaptive Temperature Strategy (ATS) that adaptively adjusts the temperature without requiring extensive hyperparameter tuning. Extensive experiments conducted on four public datasets further validate the effectiveness of MSL, achieving an average improvement of 42.24% in NDCG@10. The code is available at https://github.com/WANGBohaO-jpg/MSL.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑