Efficient Item ID Generation for Large-Scale LLM-based Recommendation

Anushya Subbiah, Vikram Aggarwal, James Pine, Steffen Rendle, Krishna Sayana, Kun SuarXiv 2025 · DOI

Introduction

Large Language Models (LLMs) have demonstrated significant potential in recommendation systems due to their ability to capture complex semantic relationships within item descriptions. However, current approaches face a critical scalability wall. Most existing research represents items as sequences of multiple text tokens (e.g., "Blue Parker Ballpoint Pen"), which introduces two primary bottlenecks: the prefill bottleneck, where long input prompts slow initial processing, and the decode bottleneck, where auto-regressive generation requires multiple forward passes to predict a single item. This paper addresses the "vocabulary disparity" between LLM token sets and massive item catalogs by treating item IDs as first-class, single-token citizens.

Methodology: Single-Token Item Representation

The core innovation of this work is the transition from multi-token to single-token item representation. By assigning a dedicated embedding vector to every item in the catalog, the model can recommend an item in a single decoding step.

Comparison of multi-token (left) vs. single-token (right) item representation architectures.

Two-Level Softmax and Inference Optimization

To handle catalogs containing millions of items, the authors implement a two-level softmax strategy. This hierarchical approach first predicts a cluster and then selects a specific item within that cluster, reducing computational complexity from $O(|I|)$ to $O(\sqrt{|I|})$. During inference, the system utilizes Approximate Nearest Neighbor (ANN) search and hierarchical pruning to achieve sub-millisecond latency.

Hierarchical inference process using a two-level softmax to efficiently navigate large item catalogs.

Training Paradigm

To ensure the LLM learns collaborative relationships directly, the authors utilize an "ID-only" training mix. In 25% of training examples, metadata is removed, forcing the model to rely solely on item IDs for both input and output. This prevents the model from over-relying on text metadata and improves its ability to capture collaborative filtering patterns.

Experimental Evaluation

The proposed method was evaluated using the Amazon Review dataset (2018) across four subsets: Office Products, Pet Supplies, Musical Instruments, and Arts, Crafts & Sewing. These datasets provide a rigorous benchmark for sequential user behavior and rich textual metadata.

Key Results

  • Inference Speedup: The single-token approach achieves a 5x to 14x speedup over multi-token baselines. For a Mistral-7B backbone, latency was reduced from approximately 475ms to 55ms.
  • Recommendation Quality: On the Amazon "Office" dataset, the single-step full softmax approach achieved a Recall@10 of 0.1330, outperforming multi-step models like CALRec (0.1213) and traditional methods like SASRec (0.1033).
  • Scalability: The two-level softmax architecture allows the model to scale to millions of items while maintaining competitive performance, a task that remains computationally prohibitive for multi-token models requiring beam search.

Discussion and Future Work

While the single-token approach significantly improves efficiency, it introduces a storage overhead proportional to the catalog size (approximately 1-2GB of VRAM per million items). Additionally, the "ID-only" mode may still face cold-start challenges for items not seen during training. Future research directions include exploring semantic clustering to group items by attributes and integrating multi-modal data, such as images, into the single-token embedding space to further enhance recommendation accuracy.

Summary updated

BibTeX
@misc{subbiah2025efficient,
  author = {Anushya Subbiah and Vikram Aggarwal and James Pine and Steffen Rendle and Krishna Sayana and Kun Su},
  title = {{Efficient Item ID Generation for Large-Scale LLM-based Recommendation}},
  year = {2025},
  eprint = {2509.03746},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.03746},
}
Figure