Bidirectional Knowledge Distillation for Enhancing Sequential Recommendation with Large Language Models

Jiongran Wu, Jiahao Liu, Dongsheng Li, Guangping Zhang, Mingzhe Han, Hansu Gu, Peng Zhang, Li Shang, Tun Lu, Ning GuarXiv 2025 · OpenReview

Abstract

Large language models (LLMs) have demonstrated exceptional performance in understanding and generating semantic patterns, making them promising candidates for sequential recommendation tasks. However, when combined with conventional recommendation models (CRMs), LLMs often face challenges related to high inference costs and static knowledge transfer methods. In this paper, we propose a novel mutual distillation framework, LLMD4Rec, that fosters dynamic and bidirectional knowledge exchange between LLM-centric and CRM-based recommendation systems. Unlike traditional unidirectional distillation methods, LLMD4Rec enables iterative optimization by alternately refining both models, enhancing the semantic understanding of CRMs and enriching LLMs with collaborative signals from user-item interactions. By leveraging sample-wise adaptive weighting and aligning output distributions, our approach eliminates the need for additional parameters while ensuring effective knowledge transfer. Extensive experiments on real-world datasets demonstrate that LLMD4Rec significantly improves recommendation accuracy across multiple benchmarks without increasing inference costs. This method provides a scalable and efficient solution for combining the strengths of both LLMs and CRMs in sequential recommendation systems.

Introduction

Sequential recommendation (SR) aims to predict a user's next interaction based on their history. Currently, the field is split between two paradigms: Conventional Recommendation Models (CRMs), which are fast and capture collaborative signals well but struggle with deep semantic meaning, and LLM-centric models, which possess superior semantic reasoning but are computationally expensive and lack structural collaborative knowledge. Existing attempts to combine these typically rely on unidirectional distillation—where a static LLM teacher trains a CRM student—which is sub-optimal as the teacher never learns from the student.

The LLMD4Rec Framework

LLMD4Rec introduces a mutual distillation framework that creates a "virtuous cycle" by alternating training between the LLM and the CRM. This iterative process allows the CRM to absorb deep semantic insights while the LLM learns collaborative user-item patterns.

Overview of the LLMD4Rec framework (c) compared to LLM-centric (a) and conventional (b) models.

The framework employs two primary mechanisms:

  1. Downward Enhancement (CRM → LLM): The CRM provides its learned item ID embeddings and output probability distributions (logits) to the LLM, injecting collaborative structural knowledge into the LLM's semantic space.
  2. Upward Semantics Distillation (LLM → CRM): The LLM acts as a teacher, distilling its high-level semantic understanding back into the CRM by aligning their final output distributions using KL divergence.

By aligning final output distributions rather than internal hidden layers, the framework avoids information loss from projection layers and preserves the full decision-making logic of both models. Crucially, because the final deployed model is the distilled CRM, the system achieves zero inference overhead in production.

Sample-wise Adaptive Weighting

A key innovation in LLMD4Rec is sample-wise adaptive weighting. Recognizing that teacher predictions are not always perfect, the system dynamically adjusts the distillation loss weight based on which model performs better on a specific sample.

The LLM loss calculation process and the sample-wise adaptive weighting based on grounding rank.

If the student CRM is already outperforming the teacher LLM on a specific user sequence, the distillation pressure is reduced to avoid misleading the student with suboptimal guidance.

Experimental Results

The model was evaluated on four real-world datasets: Amazon Beauty, Sports, Toys, and Yelp. The experiments demonstrated that LLMD4Rec significantly outperforms both standard CRMs and existing LLM-based recommenders.

  • Accuracy Gains: On the SASRec backbone, LLMD4Rec achieved an average improvement of 22.7% in Hit Ratio (HR@k) and 25.7% in NDCG@k.
  • Efficiency: The distilled CRM matched or exceeded the accuracy of much larger LLM-centric models while maintaining high inference speeds.
  • Faster Convergence: The mutual distillation process helped LLM-centric components converge faster during training compared to standard fine-tuning.

Conclusion and Future Work

LLMD4Rec provides a scalable solution for combining the strengths of LLMs and CRMs. While effective, future work could incorporate multi-modal data (images/videos), explore reinforcement learning to further optimize distillation loops, and investigate performance on "cold-start" items with limited interaction history.

Summary updated

BibTeX
@misc{wu2025bidirectional,
  author = {Jiongran Wu and Jiahao Liu and Dongsheng Li and Guangping Zhang and Mingzhe Han and Hansu Gu and Peng Zhang and Li Shang and Tun Lu and Ning Gu},
  title = {{Bidirectional Knowledge Distillation for Enhancing Sequential Recommendation with Large Language Models}},
  year = {2025},
  eprint = {2505.18120},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.18120},
}
Figure