arXiv:2510.11056cs.IRcs.AI2025-10被引 9

用两阶段蒸馏让小模型学会大模型的推理能力,提升电商搜索相关性。

From Reasoning LLMs to BERT: A Two-Stage Distillation Framework for Search Relevance

  • 先训练专用教师模型,注入平台知识并生成可靠推理链。
  • 用对比推理自蒸馏技术,使小模型在不依赖显式推理路径下提升性能。
  • 在美团广告系统中实测显著提升相关性,适合高并发搜索场景。

电商平台搜索中的查询-服务相关性预测面临严格的延迟要求,难以直接使用大语言模型(LLMs)。为此,我们提出一种两阶段推理蒸馏框架,将强大教师模型的推理能力迁移到轻量级学生模型。第一阶段通过三步构建领域适配的教师模型:领域自适应预训练注入平台知识,监督微调激发推理能力,多维奖励模型偏好优化确保生成可靠的、对齐用户偏好的推理路径。该教师模型可自动标注海量搜索日志中的查询-服务对,生成相关性标签与推理链。第二阶段针对标准蒸馏中的结构异构问题,引入对比推理自蒸馏(CRSD),将同一学生模型在标准输入与推理增强输入下的行为视为师生关系,使轻量模型在推理时内化复杂决策机制,无需显式推理路径。离线评估与美团搜索广告系统的在线A/B测试表明,该框架在多个指标上实现显著提升,验证了其有效性和实际价值。

原文摘要 · Abstract (English)

Query-service relevance prediction in e-commerce search systems faces strict latency requirements that prevent the direct application of Large Language Models (LLMs). To bridge this gap, we propose a two-stage reasoning distillation framework to transfer reasoning capabilities from a powerful teacher LLM to a lightweight, deployment-friendly student model. In the first stage, we address the limitations of general-purpose LLMs by constructing a domain-adapted teacher model. This is achieved through a three-step process: domain-adaptive pre-training to inject platform knowledge, supervised fine-tuning to elicit reasoning skills, and preference optimization with a multi-dimensional reward model to ensure the generation of reliable and preference-aligned reasoning paths. This teacher can then automatically annotate massive query-service pairs from search logs with both relevance labels and reasoning chains. In the second stage, to address the challenges of architectural heterogeneity in standard distillation, we introduce Contrastive Reasoning Self-Distillation (CRSD). By modeling the behavior of the same student model under ``standard'' and ``reasoning-augmented'' inputs as a teacher-student relationship, CRSD enables the lightweight model to internalize the teacher's complex decision-making mechanisms without needing the explicit reasoning path at inference. Offline evaluations and online A/B testing in the Meituan search advertising system demonstrate that our framework achieves significant improvements across multiple metrics, validating its effectiveness and practical value.

推理蒸馏电商搜索轻量模型大模型迁移

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