Do LLMs Benefit from User and Item Embeddings in Recommendation Tasks?
Mir Rayat Imtiaz Hossain, Leo Feng, Leonid Sigal, Mohamed Osama Ahmed
TL;DR
This work tackles the limitation of decoder-only LLMs that rely on text inputs for recommendations by injecting structured collaborative-filter signals. It introduces two lightweight 2-layer MLP projectors that map user and item embeddings into the LLM's token space, enabling conditioning on a user embedding and multiple item histories, with a two-stage training procedure (Stage 1: projector pre-training; Stage 2: joint fine-tuning with LoRA adapters). On three OpenP5 datasets, the proposed Llama-Embed-Stage-2 model delivers significant gains over text-only baselines and narrows the gap to traditional collaborative-filter methods, with robust performance on unseen prompts. This approach offers a practical route to bridge traditional CF with modern generative LLMs for improved, context-rich recommendations.
Abstract
Large Language Models (LLMs) have emerged as promising recommendation systems, offering novel ways to model user preferences through generative approaches. However, many existing methods often rely solely on text semantics or incorporate collaborative signals in a limited manner, typically using only user or item embeddings. These methods struggle to handle multiple item embeddings representing user history, reverting to textual semantics and neglecting richer collaborative information. In this work, we propose a simple yet effective solution that projects user and item embeddings, learned from collaborative filtering, into the LLM token space via separate lightweight projector modules. A finetuned LLM then conditions on these projected embeddings alongside textual tokens to generate recommendations. Preliminary results show that this design effectively leverages structured user-item interaction data, improves recommendation performance over text-only LLM baselines, and offers a practical path for bridging traditional recommendation systems with modern LLMs.
