[논문 리뷰] SLMRec: Distilling Large Language Models into Small for Sequential Recommendation
SLMRec는 순차적 추천을 위한 대규모 언어 모델(Large Language Models, LLMs)에서 소규모 언어 모델(Small Language Models, SLMs)로 지식을 전이하기 위한 지식 정련 기반 접근법을 제안한다. 이는 라벨링된 데이터 없이도 파arameter 수의 13%만으로 경쟁적인 성능을 달성하며, 추론 속도는 최대 8.0배 빠르게 한다. 중간층 표현을 활용하며, 양자화 및 프루닝과의 호환성을 통해 추가적인 효율성 향상을 가능하게 한다.
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.
연구 동기 및 목표
- 대규모 언어 모델(LLMs)이 순차적 추천에 필수적인지, 특히 모델 크기와 파라미터 스케일링 측면에서 검토하기 위해.
- 매일 수십억 건의 트래픽 로그를 처리하는 실세계 플랫폼에서 대규모 LLM을 배포하는 데서 발생하는 비효율성과 비현실성을 해결하기 위해.
- 순차적 추천 작업에 있어 대규모 언어 모델의 중간층에서의 재현성 여부를 탐색하기 위해.
- 지식 정련을 통해 소규모 언어 모델(SLMs)을 활용해 경량화되고 효율적이며 높은 성능을 보이는 순차적 추천 모델을 개발하기 위해.
- 추가 최적화를 위해 기존의 효율 기법(예: 양자화, 프루닝)과의 호환성을 확보하기 위해.
제안 방법
- 기본적인 지식 정련 기법을 활용하여 대규모 교사 LLM에서 소규모 학생 SLM로 표현 지식을 전이한다.
- LLM의 중간층에서 지식을 정련하는 데 집중하며, 이러한 층들이 추천 작업에 있어 가장 유용한 표현을 담고 있음을 규명한다.
- 학생 모델이 은닉 상태 내에서 작업 지향 표현을 학습할 수 있도록 다중 supervision 신호를 활용한다.
- 가장 정보가 풍부한 층들에서만 지식을 선택적으로 전이하기 위해 레이어 스킵 전략을 적용한다.
- 메모리 및 계산 비용을 줄이기 위해 파라미터 효율적 미세조정(PEFT) 기법(예: LoRA)과 통합한다.
- 학생 모델의 아키텍처 수정이 필요 없도록 하여 다른 효율 기법과의 독립성과 조합 가능성을 확보한다.
실험 결과
연구 질문
- RQ1LLM 기반 순차적 추천의 성능은 모델 크기에 따라 어떻게 변하는가? 그리고 파arameter 스케일링이 어느 정도에서 포화 상태에 이를까?
- RQ2사전 학습된 LLM의 어느 층이 순차적 추천 작업에 가장 관련성이 높은 지식을 담고 있는가?
- RQ3구조적 수정 없이도 대규모 LLM으로부터 지식을 정련한 소규모 언어 모델이 경쟁적인 성능을 낼 수 있는가?
- RQ4지식 정련을 통해 얼마나 모델 크기와 추론 시간을 줄일 수 있으며, 추천 정확도는 유지될 수 있는가?
- RQ5제안된 정련 방법은 기존의 모델 압축 기법(예: 양자화, 프루닝)과 얼마나 호환되는가?
주요 결과
- LLM의 파라미터 수 증가에 따른 성능 향상은 일관되지 않으며, 특정 지점 이후에는 수익 감소 현상이 관찰된다.
- LLM의 중간층 대부분이 순차적 추천 작업에 있어 부용한 것으로 밝혀져, 성능 향상에 기여하는 층은 일부에 국한됨을 시사한다.
- SLMRec는 파라미터 수의 13%만으로 LLM 기반 모델과 유사한 성능을 달성하여, 효과적인 지식 정련을 통해 소규모 모델이 대규모 모델을 따라잡을 수 있음을 입증한다.
- SLMRec는 LLM 기반 기준 모델 대비 학습 시간에서 최대 6.6배, 추론 시간에서 최대 8.0배 빠른 성능을 기록한다.
- 온라인 지식 정련 환경에서도 성능이 유지되어 동적 데이터에 대한 강건성과 적응성을 입증한다.
- SLMRec는 양자화 및 프루닝과 완전히 호환되어 성능 저하 없이 추가적인 압축과 가속화가 가능하다.
이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.