Abstract
Recent advances in generative artificial intelligence, particularly large language models (LLMs), have opened new opportunities for enhancing recommender systems (RecSys). Most existing LLM-based RecSys approaches operate in a discrete space, using vector-quantized tokenizers to align with the inherent discrete nature of language models. However, these quantization methods often result in lossy tokenization and suboptimal learning, primarily due to inaccurate gradient propagation caused by the non-differentiable argmin operation in standard vector quantization. Inspired by the emerging trend of embracing continuous tokens in language models, we propose ContRec, a novel framework that seamlessly integrates continuous tokens into LLM-based RecSys. Specifically, ContRec consists of two key modules: a sigma-VAE Tokenizer, which encodes users/items with continuous tokens; and a Dispersive Diffusion module, which captures implicit user preference. The tokenizer is trained with a continuous Variational Auto-Encoder (VAE) objective, where three effective techniques are adopted to avoid representation collapse. By conditioning on the previously generated tokens of the LLM backbone during user modeling, the Dispersive Diffusion module performs a conditional diffusion process with a novel Dispersive Loss, enabling high-quality user preference generation through next-token diffusion. Finally, ContRec leverages both the textual reasoning output from the LLM and the latent representations produced by the diffusion model for Top-K item retrieval, thereby delivering comprehensive recommendation results. Extensive experiments on four datasets demonstrate that ContRec consistently outperforms both traditional and SOTA LLM-based recommender systems. Our results highlight the potential of continuous tokenization and generative modeling for advancing the next generation of recommender systems.
Introduction
The integration of Large Language Models (LLMs) into recommender systems has traditionally relied on mapping items and users to discrete tokens. This approach allows recommendation tasks to be framed as natural language generation. However, this discretization—often achieved through vector quantization—introduces significant bottlenecks. Compressing rich item embeddings into a limited set of discrete codes leads to substantial information loss. Furthermore, the non-differentiable nature of quantization operations like argmin complicates the optimization process, often requiring heuristic "tricks" that result in suboptimal gradients.
The Case for Continuous Tokens
To address these limitations, the authors of ContRec advocate for a shift toward continuous tokenization. By representing items as continuous latent vectors rather than discrete IDs, the model can preserve the "information density" required to distinguish between subtle user preferences.
As shown in Figure 2, continuous models like VAEs and Diffusion models consistently achieve lower Mean Squared Error (MSE) in reconstruction tasks compared to discrete variants like VQ-VAE or RQ-VAE. This empirical evidence suggests that continuous representations provide a more accurate foundation for modeling complex user-item interactions.
The ContRec Framework
ContRec introduces a two-pronged architecture designed to leverage the power of continuous tokens within an LLM-based framework.
σ-VAE Tokenizer
The first pillar is the σ-VAE tokenizer, which maps items into a continuous latent space. To prevent "representation collapse"—a common issue where latent vectors become indistinguishable—the authors employ three specific strategies:
- Masking Operation: Enhances robustness by forcing the model to reconstruct items from partial information.
- K-way Encoder: Utilizes parallel processing to capture diverse features.
- Gaussian Kernel (σ): Maintains necessary variance in the latent space, ensuring that distinct items remain distinct in their continuous representation.
Dispersive Diffusion Module
The core of ContRec's preference engine is the Dispersive Diffusion module. This module uses a Denoising Diffusion Probabilistic Model (DDPM) to generate the continuous representation of a user's next likely interaction.
As illustrated in Figure 6, the diffusion process is conditioned on the LLM's reasoning. The LLM acts as a high-level "brain," providing textual context (e.g., "the user prefers sci-fi movies"), which the diffusion module then translates into a precise latent vector. A key innovation here is the Dispersive Loss ($ጂ_{disp}$), which encourages the model to spread out hidden states in the batch without the computational burden of traditional negative sampling used in contrastive learning.
Experimental Evaluation
The performance of ContRec was validated across four benchmark datasets: LastFM, MovieLens 1M, Amazon Beauty, and Amazon Video Games.
The results were compelling. ContRec consistently outperformed state-of-the-art LLM-based models like TIGER and LLaRA. Specifically, the model achieved an average improvement of 11.76% in HR@10 and 10.11% in NDCG@10 over TIGER. These gains demonstrate that the combination of continuous tokenization and conditional diffusion significantly enhances the precision of generative recommendations.
Conclusion and Future Directions
ContRec represents a significant step forward in generative recommendation by moving beyond the constraints of discrete tokens. By treating recommendation as a continuous generative task, it captures nuances that text-based or quantized models miss. While the current implementation faces some latency challenges due to the LLM's reasoning phase, the substantial accuracy gains suggest that continuous-token diffusion is a promising frontier for the next generation of recommender systems. Future work will likely focus on optimizing inference speed and improving the model's adaptability to sudden shifts in user behavior.
Summary updated