让大模型推荐更准:训练时考虑搜索策略,避免好结果被误删。
BEAR: Towards Beam-Search-Aware Optimization for Recommendation with Large Language Models
- 训练时引入搜索感知正则,确保候选词在每步都可能被选中
- 在4个真实数据集上显著超越基线,提升推荐准确率
- 无需复杂模拟,开销极小,适合实际部署
近年来,大语言模型(LLMs)在推荐系统中的应用迅速增长。现有方法通常采用监督微调(SFT)使LLM适应推荐任务,并在推理时使用束搜索(beam search)高效获取前B个推荐项。然而我们发现,训练与推理存在关键不一致:尽管SFT优化了正样本的整体概率,但无法保证这些项会被束搜索选中,因为贪心剪枝机制可能导致正样本因前缀概率不足而被提前丢弃。为解决此问题,我们提出BEAR(Beam-Search-Aware Regularization),一种在训练中显式考虑束搜索行为的新微调目标。不同于对每个实例直接模拟束搜索(计算开销巨大),BEAR施加一个宽松的必要条件:正样本中的每个词在解码每一步都必须排在前B个候选词内。该目标有效降低了错误剪枝风险,且相比标准SFT仅带来可忽略的计算开销。在四个真实数据集上的大量实验表明,BEAR显著优于多个强基线。代码已公开于https://github.com/Tiny-Snow/BEAR-SIGIR-2026。
原文摘要 · Abstract (English)
Recent years have seen a rapid surge in research leveraging Large Language Models (LLMs) for recommendation. These methods typically employ supervised fine-tuning (SFT) to adapt LLMs to recommendation scenarios, and utilize beam search during inference to efficiently retrieve $B$ top-ranked recommended items. However, we identify a critical training-inference inconsistency: while SFT optimizes the overall probability of positive items, it does not guarantee that such items will be retrieved by beam search even if they possess high overall probabilities. Due to the greedy pruning mechanism, beam search can prematurely discard a positive item once its prefix probability is insufficient. To address this inconsistency, we propose BEAR (Beam-SEarch-Aware Regularization), a novel fine-tuning objective that explicitly accounts for beam search behavior during training. Rather than directly simulating beam search for each instance during training, which is computationally prohibitive, BEAR enforces a relaxed necessary condition: each token in a positive item must rank within the top-$B$ candidate tokens at each decoding step. This objective effectively mitigates the risk of incorrect pruning while incurring negligible computational overhead compared to standard SFT. Extensive experiments across four real-world datasets demonstrate that BEAR significantly outperforms strong baselines. Code is available at https://github.com/Tiny-Snow/BEAR-SIGIR-2026 .
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。