HiD-VAE: Interpretable Generative Recommendation via Hierarchical and Disentangled Semantic IDs

Dengzhao Fang, Jingtong Gao, Chengcheng Zhu, Yu Li, Xiangyu Zhao, Yi ChangarXiv 2025 · OpenReview

Abstract

Recommender systems are indispensable for helping users navigate the immense item catalogs of modern online platforms. Recently, generative recommendation has emerged as a promising paradigm, unifying the conventional retrieve-and-rank pipeline into an end-to-end model capable of dynamic generation. However, existing generative methods are fundamentally constrained by their unsupervised tokenization, which generates semantic IDs suffering from two critical flaws: (1) they are semantically flat and uninterpretable, lacking a coherent hierarchy, and (2) they are prone to representation entanglement (i.e., "ID collisions"), which harms recommendation accuracy and diversity. To overcome these limitations, we propose HiD-VAE, a novel framework that learns hierarchically disentangled item representations through two core innovations. First, HiD-VAE pioneers a hierarchically-supervised quantization process that aligns discrete codes with multi-level item tags, yielding more uniform and disentangled IDs. Crucially, the trained codebooks can predict hierarchical tags, providing a traceable and interpretable semantic path for each recommendation. Second, to combat representation entanglement, HiD-VAE incorporates a novel uniqueness loss that directly penalizes latent space overlap. This mechanism not only resolves the critical ID collision problem but also promotes recommendation diversity by ensuring a more comprehensive utilization of the item representation space. These high-quality, disentangled IDs provide a powerful foundation for downstream generative models. Extensive experiments on three public benchmarks validate HiD-VAE's superior performance against state-of-the-art methods.

Introduction

The paradigm of recommender systems is evolving from traditional "retrieve-and-rank" pipelines toward generative recommendation. In this approach, models autoregressively generate an item's "Semantic ID"—a sequence of discrete tokens representing its features. While promising, current generative models are hindered by semantic flatness and ID collisions. Unsupervised tokenization often results in numerical codes that lack human-readable meaning, creating a "black box" effect. Furthermore, distinct items can be assigned identical IDs due to representation entanglement in a crowded latent space, leading to poor accuracy and limited diversity.

Comparison of standard VQ-VAE vs. HiD-VAE, highlighting the resolution of ID collisions through hierarchical and disentangled semantic IDs.

Methodology: The HiD-VAE Framework

HiD-VAE addresses these challenges through a two-stage framework designed to create a structured, interpretable, and collision-free item vocabulary.

Stage 1: Offline Hierarchical ID Learning

The first stage focuses on learning high-quality semantic IDs. For datasets lacking native hierarchies, an LLM-powered "retrieval-then-classification" pipeline generates multi-level category tags (e.g., Clothing → Topwear → Dress). These tags supervise the quantization process via two primary mechanisms:

  1. Tag Alignment Loss: A contrastive loss that pulls item embeddings toward their corresponding category embeddings.
  2. Tag Prediction Loss: A classification loss ensuring each ID layer accurately predicts the item's category at that hierarchical level.

To eliminate ID collisions, HiD-VAE introduces a Uniqueness Loss. This loss penalizes latent space overlap between different items, forcing the model to utilize the representation space more efficiently and ensuring each item has a distinct code.

Stage 2: Online Interpretable Recommendation

Once IDs are learned, a Transformer model is trained to predict them based on user history. Because these IDs correspond to real-world categories, the recommendation process becomes traceable. Instead of predicting opaque numerical strings, the model follows a specific path through a product taxonomy, enhancing interpretability.

The two-stage HiD-VAE framework: (a) Offline Hierarchical ID Learning with specific losses, and (b) Online Interpretable Recommendation.

Experimental Evaluation

HiD-VAE was evaluated on three benchmarks: Amazon Beauty, Amazon Sports and Outdoors, and KuaiRand-1K.

Key Results

  • Performance Gains: On the Amazon Beauty dataset, HiD-VAE achieved a 35.07% relative improvement in Recall@5 and a 33.08% improvement in NDCG@5 compared to the state-of-the-art LC-Rec.
  • Collision Mitigation: The framework significantly reduced ID collision rates. For instance, in the Beauty dataset, collisions dropped from 21.2% (standard VQ-Rec) to just 2.1%.
  • Interpretability: Case studies confirmed that HiD-VAE provides a clear "semantic path," allowing for a transparent understanding of why specific items are recommended based on their category lineage.

Conclusion and Future Directions

HiD-VAE demonstrates that incorporating hierarchical supervision and uniqueness constraints significantly enhances the quality of semantic IDs in generative recommendation. Future work will explore expanding the framework to multi-modal IDs, integrating visual and auditory data via encoders like CLIP to capture stylistic nuances beyond text. Additionally, the authors aim to investigate the direct use of LLMs for the sequential prediction stage to further leverage their reasoning capabilities.

Summary updated

BibTeX
@misc{fang2025hid,
  author = {Dengzhao Fang and Jingtong Gao and Chengcheng Zhu and Yu Li and Xiangyu Zhao and Yi Chang},
  title = {{HiD-VAE: Interpretable Generative Recommendation via Hierarchical and Disentangled Semantic IDs}},
  year = {2025},
  eprint = {2508.04618},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.04618},
}
Figure