[논문 리뷰] LlamaRec: Two-Stage Recommendation using Large Language Models for Ranking
LlamaRec는 빠른 검색 단계와 LLM 기반 랭킹 단계를 결합하여 버버라이저를 활용해 상위-k 후보를 효율적으로 랭킹하고, 생성 기반 베이스라인보다 우수한 성능과 더 빠른 추론을 달성합니다.
Recently, large language models (LLMs) have exhibited significant progress in language understanding and generation. By leveraging textual features, customized LLMs are also applied for recommendation and demonstrate improvements across diverse recommendation scenarios. Yet the majority of existing methods perform training-free recommendation that heavily relies on pretrained knowledge (e.g., movie recommendation). In addition, inference on LLMs is slow due to autoregressive generation, rendering existing methods less effective for real-time recommendation. As such, we propose a two-stage framework using large language models for ranking-based recommendation (LlamaRec). In particular, we use small-scale sequential recommenders to retrieve candidates based on the user interaction history. Then, both history and retrieved items are fed to the LLM in text via a carefully designed prompt template. Instead of generating next-item titles, we adopt a verbalizer-based approach that transforms output logits into probability distributions over the candidate items. Therefore, the proposed LlamaRec can efficiently rank items without generating long text. To validate the effectiveness of the proposed framework, we compare against state-of-the-art baseline methods on benchmark datasets. Our experimental results demonstrate the performance of LlamaRec, which consistently achieves superior performance in both recommendation performance and efficiency.
연구 동기 및 목표
- 실시간 추론 제약을 다루면서 추천에 LLM의 사용을 촉진한다.
- 검색과 LLM 기반 랭킹을 결합한 두 단계 프레임워크를 제안한다.
- 버버라이저가 자기회귀 생성 없이 빠르고 단일 패스 스코어링을 가능하게 함을 보인다.
제안 방법
- LRURec를 검색 모듈로 사용하여 사용자 이력에서 상위-k 후보 아이템을 산출한다.
- 히스토리와 후보 타이틀을 포함하는 명령 템플릿을 사용하여 Llama 2 랭커용 텍스트 입력을 구성한다.
- 긴 텍스트를 생성하지 않고 후보 인덱스 문자에 대한 LLM 헤드 로짓을 매핑하여 순위 점수로 변환하는 버버라이저를 적용한다.
- QLoRA 양자화를 사용하여 프롬프트의 응답 부분에 대한 지시 학습으로 Llama 2 랭커를 미세조정한다.
- 레이블 토큰(인덱스 문자 및 EOS)에 대한 다음 토큰과 유사한 손실로 정답 아이템 점수를 최대화하도록 학습한다.
- 입력 길이와 후보를 각각 상위 20개로 제한하고, 효율성을 위한 히스토리 최대 20개 아이템.
실험 결과
연구 질문
- RQ1LLM 기반 추천에서 두 단계 프레임워크가 검색과 랭킹 성능을 모두 향상시킬 수 있는가?
- RQ2LLM의 생성 기반 랭킹에 비해 버버라이저 기반 랭킹 접근 방식이 효율성을 향상시킬 수 있는가?
- RQ3표준 순차 추천 벤치마크에서 LlamaRec가 최첨단 베이스라인과 어떻게 비교되는가?
주요 결과
- LlamaRec는 MRR, NDCG, Recall 등 다수의 지표에서 여러 데이터셋의 베이스라인 방법을 능가한다.
- 가장 큰 향상은 ML-100k에서 나타나며 MRR@5, NDCG@5, Recall@5에서 두드러진 향상을 보인다.
- 유효 검색 부분집합에서 LlamaRec는 전체 평가보다 절대 이익이 더 크며, 실제로 관련 아이템을 효과적으로 랭킹함을 시사한다.
- Beauty에서 다른 LLM 기반 베이스라인과 비교할 때 LlamaRec는 상당한 성능 향상을 달성한다(지표별 평균 약 14.31%).
- 버버라이저 방법은 추론 효율성을 크게 향상시키며, 모든 후보를 한 번의 순전파로 점수화할 수 있게 하고, 긴 디코딩 시간이 필요한 생성 기반 방법과 대비된다.
이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.