Skip to main content
QUICK REVIEW

[論文レビュー] SLMRec: Distilling Large Language Models into Small for Sequential Recommendation

Wujiang Xu, Wu, Qitian|arXiv (Cornell University)|May 28, 2024
Recommender Systems and TechniquesComputer Science被引用数 3
ひとこと要約

SLMRecは、大規模言語モデル(LLM)から小規模言語モデル(SLM)へ知識蒸留を行うアプローチを提案し、パラメータの13%のみで競争力ある性能を達成するとともに、推論速度が最大8.0倍速くなる。中間層の表現を活用し、さらに量子化やプルーニングと組み合わせて効率性を向上させることができる。

ABSTRACT

Sequential Recommendation (SR) task involves predicting the next item a user is likely to interact with, given their past interactions. The SR models examine the sequence of a user's actions to discern more complex behavioral patterns and temporal dynamics. Recent research demonstrates the great impact of LLMs on sequential recommendation systems, either viewing sequential recommendation as language modeling or serving as the backbone for user representation. Although these methods deliver outstanding performance, there is scant evidence of the necessity of a large language model and how large the language model is needed, especially in the sequential recommendation scene. Meanwhile, due to the huge size of LLMs, it is inefficient and impractical to apply a LLM-based model in real-world platforms that often need to process billions of traffic logs daily. In this paper, we explore the influence of LLMs' depth by conducting extensive experiments on large-scale industry datasets. Surprisingly, our motivational experiments reveal that most intermediate layers of LLMs are redundant, indicating that pruning the remaining layers can still maintain strong performance. Motivated by this insight, we empower small language models for SR, namely SLMRec, which adopt a simple yet effective knowledge distillation method. Moreover, SLMRec is orthogonal to other post-training efficiency techniques, such as quantization and pruning, so that they can be leveraged in combination. Comprehensive experimental results illustrate that the proposed SLMRec model attains the best performance using only 13% of the parameters found in LLM-based recommendation models while simultaneously achieving up to 6.6x and 8.0x speedups in training and inference time costs, respectively. Besides, we provide a theoretical justification for why small language models can perform comparably to large language models in SR.

研究の動機と目的

  • 大規模言語モデル(LLM)が順序推薦に必要かどうか、特にモデルサイズとパラメータスケーリングの観点から検討すること。
  • 毎日数十億件のトラフィックログを処理する実世界のプラットフォームにおいて、大規模LLMの導入が非効率的で現実的でない問題を解決すること。
  • 順序推薦タスクにおけるLLMの内部層の冗長性を調査すること。
  • 知識蒸留を活用して、小規模言語モデル(SLM)を用いて軽量で効率的かつ高精度な順序推薦モデルを開発すること。
  • さらなる最適化のため、量子化やプルーニングなどの既存の効率化技術と互換性を持つことを保証すること。

提案手法

  • 大規模な教師モデルであるLLMから小規模な学生モデルであるSLMへ、代表表現の知識を転送するためのシンプルな知識蒸留を採用する。
  • LLMの中間層からの知識転送に注目し、これらの層が順序推薦に最も有用な表現を含んでいることを同定する。
  • 学生モデルが隠れ状態内でタスクに適した表現を学ぶように、複数の監視信号を用いる。
  • 教師モデルの最も情報量の多い層から知識を効率的に転送するため、レイヤースキッピング戦略を適用する。
  • パラメータ効率の良い微調整(PEFT)技術(例:LoRA)を組み合わせることで、蒸留中のメモリと計算コストを削減する。
  • 学生モデルにアーキテクチャの変更を加える必要がなくなるため、他の効率化技術と直交的かつ組み合わせ可能になる。

実験結果

リサーチクエスチョン

  • RQ1LLMベースの順序推薦におけるパフォーマンスは、モデルサイズに応じてどのように変化するか。また、どこまでスケーリングを行えば効果が薄れ始めるか。
  • RQ2事前学習済みLLMのどの層が、順序推薦タスクにおいて最も関連性の高い知識を含んでいるか。
  • RQ3アーキテクチャの変更なしに、LLMから知識を蒸留することで小規模言語モデルが競争力ある性能を達成できるか。
  • RQ4知識蒸留によって、どの程度モデルサイズと推論時間を削減できるか。同時に推薦精度を維持できるか。
  • RQ5提案手法の知識蒸留は、量子化やプルーニングといった既存のモデル圧縮技術とどの程度互換性があるか。

主な発見

  • LLMのパラメータ数を増やすことで得られるパフォーマンス向上は一貫しない。ある閾値を超えると、限界効果が顕著に現れる。
  • LLMの中間層の大部分は、順序推薦タスクにおいて冗長であることが示され、性能向上に寄与するのは一部の層に限られることが明らかになった。
  • SLMRecは、パラメータをわずか13%にまで削減しながら、LLMベースのモデルと同等の性能を達成しており、知識を的確に蒸留すれば、小規模モデルでも大規模モデルと同等の性能が得られることを示している。
  • SLMRecは、LLMベースのベースラインと比較して、学習時間で最大6.6倍、推論時間で最大8.0倍の高速化を達成している。
  • オンライン知識蒸留でも有効であることが確認され、動的データへの適応性と頑健性を示している。
  • SLMRecは量子化やプルーニングと完全に互換性があり、性能の低下を伴わずにさらなる圧縮と高速化が可能である。

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。