One Model for All: Large Language Models are Domain-Agnostic Recommendation Systems

Zuoli Tang, Zhaoxin Huan, Zihao Li, Xiaolu Zhang, Jun Hu, Chilin Fu, Jun Zhou, Lixin Zou, Chenliang Li

TL;DR

LLM-Rec is a novel framework that reimagines recommendation systems by replacing arbitrary item IDs with natural language titles processed by Large Language Models (LLMs). By treating a user's cross-domain interaction history as a single sentence, the model leverages the "world knowledge" of LLMs to bridge semantic gaps between disparate domains (like war movies and history books), significantly outperforming traditional ID-based methods in multi-domain and cold-start scenarios.

What Problem Does This Paper Address?

Sequential recommendation systems—which predict your next click based on your past behavior—suffer from two chronic issues: data sparsity and the cold-start problem. While "multi-domain" recommendation (using data from one category to help another) is a common solution, it usually relies on item IDs.

The authors argue that IDs are "meaningless" strings of numbers. An ID for a war movie in a video database shares no inherent information with an ID for a World War II history book in a bookstore database. This makes it incredibly difficult for models to transfer knowledge across domains. As shown in the authors' preliminary study, simply feeding multi-domain IDs into a standard model like SASRec can actually degrade performance because the model struggles to find commonalities between the domains.

Users' interests across various domains exhibit semantic correlations, such as a preference for war-themed media across movies and books.

Methods

The authors propose LLM-Rec, a domain-agnostic framework that uses LLMs as unified encoders for both users and items.

  1. Textual Representation: Instead of IDs, every item is represented by its title.
  2. User Modeling: A user’s history is constructed by concatenating the titles of all items they have interacted with across all domains into a chronological "sentence."
  3. Backbones: The researchers tested three architectures:
  4. Encoder-only: BERT (bi-directional attention).
  5. Decoder-only: OPT (uni-directional/autoregressive).
  6. Encoder-Decoder: FLAN-T5 (using only the encoder for representation).
  7. Training: The model is fine-tuned using a sampled cross-entropy loss, where the goal is to maximize the inner product between the user representation and the ground-truth next-item representation.
  8. Tuning Strategies: They compared Full Parameter Fine-Tuning (FPFT) against Parameter-Efficient Fine-Tuning (PEFT) using LoRA.
Fig. 3. The overview of the proposed LLM-Rec

Datasets

The study utilized five sub-categories from the Amazon reviews dataset:

  • Scientific
  • Pantry
  • Musical Instruments
  • Arts, Crafts and Sewing
  • Office Products

These were combined into a unified multi-domain dataset called SPIAO. For zero-shot evaluation (testing on domains the model never saw during training), they used the "Food" and "Home" categories.

Key Insights and Ideas

  • Semantics Bridge the Gap: LLMs can identify that a user who bought a stethoscope (Scientific) and a ballpoint pen (Office) might be a doctor looking for bandage shears (Arts). ID-based models miss these linguistic cues.
  • The Scaling Plateau: In NLP, "bigger is better" is a law. In recommendation, the authors found that for fine-tuned tasks, performance gains plateaued once models reached about 100M parameters. However, for zero-shot tasks, larger models (like OPT-6.7B) continued to show significant improvements.
  • Collaborative Filtering vs. Semantics: While LLMs excel at semantic understanding, they still exhibit "popularity bias" (the Matthew Effect), suggesting they learn to prioritize frequently seen items much like traditional collaborative filtering models.
  • IDs Still Matter: Interestingly, prepending the item ID to the title in the text prompt actually improved performance. This suggests that while titles provide semantic context, IDs provide a precise anchor that helps the model distinguish between similar items.

Key Results

  • Superior Performance: LLM-Rec achieved a relative improvement of over 19% on the SPIAO dataset compared to the best-performing baseline.
  • Cross-Domain Success: In the "Diff" setting—where the target item comes from a domain entirely different from the user's history—LLM-Rec showed the most dramatic improvements over ID-based models (up to 45.9% relative improvement in Recall@1).
  • Zero-Shot Prowess: The OPT-6.7B model, without any training on the "Food" dataset, was able to outperform a fully-trained SASRec model that relied on IDs.
  • Tuning Matters: For models smaller than 1B parameters, full-parameter fine-tuning was significantly more effective than LoRA.

Limitations and Future Work

  • Inference Latency: LLMs are computationally heavy. The authors noted that LLM-Rec is significantly slower than traditional methods, making real-time deployment a challenge without heavy optimization or acceleration strategies.
  • Training Costs: Full-parameter fine-tuning of models like OPT-6.7B is extremely resource-intensive, often requiring multiple high-end GPUs (e.g., 6x A100-80G).
  • Future Directions: The authors suggest exploring more sophisticated prompting techniques and investigating how to better balance the model's reliance on semantic knowledge versus collaborative filtering signals.

Summary updated

BibTeX
@article{tang2025one,
  author = {Zuoli Tang and Zhaoxin Huan and Zihao Li and Xiaolu Zhang and Jun Hu and Chilin Fu and Jun Zhou and Lixin Zou and Chenliang Li},
  title = {{One Model for All: Large Language Models are Domain-Agnostic Recommendation Systems}},
  journal = {ACM Trans. Information Systems},
  year = {2025},
  doi = {10.1145/3705727},
}
Figure