NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Large Language Models Enhanced Collaborative Filtering

Zhongxiang Sun, Zihua Si, Xiaoxue Zang, Kai Zheng, Yang Song, Xiao Zhang, Jun Xu

TL;DR

LLM-CF (Large Language Models enhanced Collaborative Filtering) is a framework that distills the reasoning and world knowledge of LLMs into dense features for traditional recommender systems. By decoupling heavy LLM generation from real-time inference, it significantly boosts recommendation accuracy across various backbone models without the latency penalties typically associated with large models.

What Problem Does This Paper Address?

Modern Recommender Systems (RS) primarily rely on Collaborative Filtering (CF)—the art of predicting user preferences based on past interactions. While effective, traditional CF models often lack "world knowledge" (e.g., understanding that a user who bought a yoga mat might also want a foam roller).

Large Language Models (LLMs) possess this world knowledge and can reason about user intent. However, two major hurdles prevent their direct use in production RS:

  1. Efficiency: LLMs are too slow for the millisecond-scale requirements of online ranking.
  2. Input Bottlenecks: LLMs have limited context windows, making it impossible to feed them the millions of users and items required for deep collaborative filtering.

Existing hybrid approaches often treat LLMs as simple feature extractors or use knowledge distillation, which can lead to a "misalignment" of optimization goals. The authors of this paper sought a way to inject LLM-based reasoning into the CF process efficiently and effectively.

Methods

The LLM-CF framework operates in two distinct phases:

1. The Offline Service (The "Brain")

The authors first developed RecGen-LLaMA, a fine-tuned version of LLaMA-2. They discovered that fine-tuning an LLM solely on recommendation data causes "catastrophic forgetting" of general knowledge. To fix this, they used a data-mixing strategy, combining recommendation tasks with general instruction-tuning data to maintain a balance between domain expertise and general reasoning.

This model is then used to generate Chain-of-Thought (CoT) reasoning for a subset of the training data. For example, instead of just seeing a "click," the LLM explains why a user might click, considering their history and item features. This reasoning is stored in an In-context CoT Dataset.

2. The Online Service (The "Muscle")

To keep the system fast, the heavy LLM is never called during a live user request. Instead:

  • Retrieval: When a user interacts, the system retrieves the top-$K$ similar historical examples from the offline CoT dataset.
  • ICT Module: An In-context Chain of Thought (ICT) module—a lightweight Transformer decoder—processes these retrieved examples and their pre-generated CoT reasoning.
  • Feature Fusion: The ICT module outputs a dense "LLM-enhanced CF feature" vector. This vector is then fed into a standard, fast backbone model (like DeepFM or xDeepFM) to make the final prediction.
The overall architecture of LLM-CF, showing the decoupling of offline CoT generation and online feature learning.

Datasets

The researchers evaluated LLM-CF using three widely recognized subsets of the Amazon Review Dataset (2019):

  • Sports & Outdoors
  • Beauty
  • Toys & Games

These datasets vary in sparsity and scale, providing a robust testing ground for both Click-Through Rate (CTR) prediction and retrieval tasks.

Key Insights and Ideas

  • The Balancing Act: Figure 4 highlights a critical finding: full fine-tuning on recommendation data (the "Full" point) maximizes recommendation AUC but tanks general intelligence (MMLU score). Their RecGen approach (the green star) finds the optimal Pareto frontier.
  • Reasoning as a Feature: The core "aha moment" is that LLM reasoning (CoT) can be treated as a high-quality data augmentation. By retrieving similar reasoned examples, the model gains a "template" for how to think about the current user-item pair.
  • Decoupling is Key: By moving LLM inference offline and using a small Transformer for online feature fusion, the authors achieve the benefits of a 7B+ parameter model with the latency of a much smaller one.
Comparison of recommendation vs. general capabilities across different fine-tuning methods.

Key Results

LLM-CF was tested against six backbone models (DeepFM, xDeepFM, AutoInt, DCNv1, DCNv2, and DIN) and two competitive LLM-based baselines (KAR and KD).

  • Consistent Gains: LLM-CF outperformed all backbones across all datasets. For instance, it achieved a 7.46% relative improvement in AUC for DeepFM on the Toys dataset.
  • Superior to Baselines: It consistently beat KAR and Knowledge Distillation (KD) methods, proving that explicit CoT reasoning is more powerful than just using LLM embeddings or logits.
  • Versatility: Beyond ranking, the framework also improved retrieval models like SASRec and GRU4Rec, showing it can enhance the entire recommendation pipeline.

Limitations and Future Work

  • Text Dependency: The framework relies on textual features (titles, categories). While the authors found that removing text only led to a slight decline, the system's "world knowledge" advantage is strongest when rich metadata is available.
  • Retrieval Overhead: While much faster than LLM inference, the system still requires an Approximate Nearest Neighbor (ANN) search and a small Transformer pass online.
  • Future Directions: The authors suggest exploring cross-domain recommendation, where the LLM's general knowledge could help bridge the gap between entirely different product categories.

Summary updated

BibTeX
@inproceedings{sun2024large,
  author = {Zhongxiang Sun and Zihua Si and Xiaoxue Zang and Kai Zheng and Yang Song and Xiao Zhang and Jun Xu},
  title = {{Large Language Models Enhanced Collaborative Filtering}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2024},
  doi = {10.1145/3627673.3679558},
}
Figure