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 · 2025
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 recommendationspecific 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