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

Q-BERT4Rec: Quantized Semantic-ID Representation Learning for Multimodal Recommendation

Haofeng Huang, Ling GaiarXiv 2025 · DOI

TL;DR

This paper introduces Q-BERT4Rec, a novel framework for multimodal sequential recommendation that learns "semantic IDs" for items by fusing text and image data and then quantizing these representations into discrete tokens. This approach significantly improves recommendation accuracy by enabling better generalization and interpretability compared to traditional methods that rely on arbitrary item IDs.

What Problem Does This Paper Address?

Sequential recommendation systems are crucial for predicting users' next actions in various online platforms. While Transformer-based models like BERT4Rec have shown great promise, they often struggle with personalization due to their reliance on discrete, non-semantic item IDs. Furthermore, these models typically ignore rich multimodal information (text, images) that could significantly enhance understanding of item characteristics and user preferences. Existing methods that attempt to incorporate multimodal data often do so in ways that lead to inconsistent representations or decouple multimodal fusion from sequential modeling, hindering generalization and interpretability. This paper aims to bridge this gap by creating a unified framework that leverages multimodal information to learn meaningful, discrete item representations for sequential recommendation.

Methods

Q-BERT4Rec employs a three-stage approach:

  1. Dynamic Cross-Modal Semantic Injection: This stage enriches randomly initialized item ID embeddings by fusing textual, visual, and structural features. A dynamic Transformer with a learnable gating mechanism adaptively controls the fusion depth, allowing the model to focus on semantically relevant information for each item. This is a novel approach to multimodal fusion, moving beyond fixed-depth fusion strategies.
  2. Semantic Quantization: The fused multimodal representations are then discretized into meaningful tokens using a Residual Vector Quantized Variational Autoencoder (RQ-VAE). This process converts rich semantic information into compact "semantic IDs" (sequences of discrete tokens), which serve as interpretable and transferable item identifiers. This is inspired by techniques in natural language processing for creating shared vocabularies.
  3. Multi-Mask Pretraining and Fine-tuning: A BERT-style sequential encoder is pretrained using a novel "Multi-Mask Pretraining" strategy. This strategy combines span masking, tail masking, and multi-region masking to improve the model's ability to capture both local transitions and long-range dependencies in user sequences, enhancing robustness and sequential understanding.

Datasets

The experiments were conducted on the Amazon Product Reviews dataset, which contains user-item interaction histories across various domains. Six source domains (Pet Supplies, Cell Phones and Accessories, Automotive, Tools and Home Improvement, Toys and Games, and Sports and Outdoors) were used for pretraining, and three target domains (Musical Instruments, Arts, Crafts and Sewing, and Video Games) were used for fine-tuning and evaluation.

Key Insights and Ideas

  • Semantic IDs are Powerful: Replacing arbitrary item IDs with sequences of quantized semantic tokens derived from multimodal data significantly boosts recommendation performance. This suggests that items can be represented by their "meaning" rather than just an identifier.
  • Dynamic Fusion Matters: Adaptively controlling the depth of multimodal fusion (rather than using a fixed approach) leads to more coherent and semantically aligned item representations, improving the integration of different modalities.
  • Quantization Bridges Modalities: Vector quantization effectively bridges the gap between continuous multimodal features and discrete item representations, enabling efficient and interpretable modeling.
  • Multi-Mask Pretraining Enhances Robustness: Combining different masking strategies during pretraining allows the model to learn more comprehensive sequential patterns, leading to better generalization.

Key Results

Q-BERT4Rec consistently outperformed strong existing baselines across three Amazon sub-datasets. For example, on the Instruments dataset, it achieved an HR@5 of 0.1153 and NDCG@10 of 0.1077, showing significant improvements over the previous best model. The model demonstrated strong generalization capabilities, particularly on sparse and noisy datasets. The ablation studies confirmed the effectiveness of each proposed component: dynamic cross-modal injection, semantic quantization, and multi-mask pretraining. The model is also computationally efficient, with fewer than 6 million parameters and inference times under 3 ms per sample.

Limitations and Future Work

The paper acknowledges that while the proposed method shows strong performance, future work could involve expanding semantic-ID modeling to larger-scale catalogs and incorporating more modalities. The authors also suggest exploring the potential of this approach in generative recommendation and unified multimodal pretraining.

Summary updated

BibTeX
@misc{huang2025q,
  author = {Haofeng Huang and Ling Gai},
  title = {{Q-BERT4Rec: Quantized Semantic-ID Representation Learning for Multimodal Recommendation}},
  year = {2025},
  eprint = {2512.02474},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.02474},
}
Figure