arXiv:2505.07105cs.IRcs.LG2025-05被引 9

用大模型蒸馏出高效搜索模型,提升电商推荐相关性

Knowledge Distillation for Enhancing Walmart E-commerce Search Relevance Using Large Language Models

  • 用软标签训练大模型作教师,再蒸馏到小模型
  • 扩充数据集后学生模型性能超越教师模型
  • 已落地沃尔玛生产系统,效果显著

确保电商平台搜索结果与用户查询相关对提升用户体验至关重要。深度学习模型凭借其强大的语义理解能力被广泛用于搜索相关性匹配。尽管大型语言模型(LLMs)具备卓越的排序能力,但其高延迟特性难以在实时系统中部署。为兼顾大模型的排序优势与生产系统的低延迟需求,我们提出一种新框架:将高性能大模型蒸馏为更高效、低延迟的学生模型。为帮助学生模型更好地学习,先以软标签训练教师模型作为分类器,再使用均方误差损失训练学生模型捕捉查询下产品对的相关性差距。不同于直接复用教师模型训练数据,我们通过生成无标签数据并用教师模型预测打标,大幅扩充学生模型训练集。实验表明,随着增强数据量增加,学生模型性能持续提升;当数据足够时,学生模型甚至超越教师模型。该学生模型已在Walmart.com成功上线,带来显著正向指标改善。

原文摘要 · Abstract (English)

Ensuring the products displayed in e-commerce search results are relevant to users queries is crucial for improving the user experience. With their advanced semantic understanding, deep learning models have been widely used for relevance matching in search tasks. While large language models (LLMs) offer superior ranking capabilities, it is challenging to deploy LLMs in real-time systems due to the high-latency requirements. To leverage the ranking power of LLMs while meeting the low-latency demands of production systems, we propose a novel framework that distills a high performing LLM into a more efficient, low-latency student model. To help the student model learn more effectively from the teacher model, we first train the teacher LLM as a classification model with soft targets. Then, we train the student model to capture the relevance margin between pairs of products for a given query using mean squared error loss. Instead of using the same training data as the teacher model, we significantly expand the student model dataset by generating unlabeled data and labeling it with the teacher model predictions. Experimental results show that the student model performance continues to improve as the size of the augmented training data increases. In fact, with enough augmented data, the student model can outperform the teacher model. The student model has been successfully deployed in production at Walmart.com with significantly positive metrics.

知识蒸馏电商搜索LLM应用排序优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。