Source-linked AI summary
HiD-VAE: Interpretable Generative Recommendation via Hierarchical and Disentangled Semantic IDs
Dengzhao Fang, Jingtong Gao, Chengcheng Zhu, Yu Li, Xiangyu Zhao, Yi Chang
TL;DR
Existing generative recommendation relies on semantic IDs that can be flat and entangled, limiting interpretability and causing collisions. HiD-VAE combines hierarchical tag supervision with a uniqueness loss, and reports state-of-the-art results across three benchmarks.
Problem
Unsupervised semantic-ID tokenization can produce flat, uninterpretable IDs and entangled representations with collisions, limiting generative recommendation.
Source: §1 · p. 1Method
HiD-VAE uses tag-alignment and tag-prediction losses to supervise hierarchical quantization, plus a uniqueness loss to reduce overlap between distinct items.
Source: §1 · p. 2Results
HiD-VAE reports state-of-the-art performance across three benchmarks; on Beauty, it improves Recall@5 by 35.07% and NDCG@5 by 33.08% over LC-REC.
Source: §4.2 · p. 6, §5 · p. 8Takeaways & Limitations
Abstract
from arXiv · showhide
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. The code is available at https://anonymous.4open.science/r/HiD-VAE-84B2.
1 Introduction
Sequential recommendation helps model dynamic user preferences, while generative recommendation aims to unify retrieval and ranking through autoregressive item-ID generation. HiD-VAE addresses semantic-ID flatness and collisions with hierarchical supervision and a uniqueness loss.
1 Introduction
- Sequential recommendation is a cornerstone for capturing dynamic user preferences on modern digital platforms.The introduction frames recommender systems as essential for navigating information overload.Source: §1 · p. 1
- Generative recommendation can unify retrieval and ranking by autoregressively generating item identifiers, but its effectiveness depends on semantic-ID quality.The typical pipeline first quantizes item content into semantic IDs, then predicts the next item's ID from user history.Source: §1 · p. 1
- Unsupervised quantization yields flat, uninterpretable IDs and entangled representations that can collide, undermining recommendation accuracy and diversity.The introduction describes these IDs as lacking explicit hierarchy and rendering models uncontrollable black boxes.Source: §1 · p. 2
- HiD-VAE aligns VAE layers with hierarchical tags using alignment and prediction losses, while a uniqueness loss penalizes overlap between distinct items.It also proposes an LLM-based approach to generate hierarchical tags for datasets without ground-truth labels.Source: §1 · p. 2
- HiD-VAE reports state-of-the-art recommendation accuracy and interpretability on three public datasets, using LLM-generated hierarchical tags when explicit categories are absent.Its layered semantic IDs provide a category path, as illustrated by the Clothing → Topwear → Dress example.Source: Figure 1 · p. 1, §1 · p. 2
2 Related Work
The section briefly surveys sequential recommendation, from traditional and Transformer-based models to generative models.
2 Related Work
- The section sketches the trajectory from traditional and Transformer-based sequential models to generative models, directing readers to Appendix A for detailed related work.The authors cite space constraints as the reason for placing the detailed discussion in the appendix.Source: §2 · p. 2
3 Methodology
HiD-VAE separates item representation learning from sequential recommendation in a two-stage framework. It learns hierarchical, disentangled semantic IDs using tag supervision and a uniqueness loss, then uses a Transformer to predict IDs from user histories.
3.1 Preliminary
- HiD-VAE adapts RQ-VAE’s cascade of residual quantizers for hierarchical item tokenization, adding explicit tag supervision and a disentanglement mechanism.Each successive quantizer operates on the residual left by the preceding layer.Source: §3.1 · p. 2
3.2 Problem Formulation
- The recommender predicts the next item in a user’s chronological interaction sequence by generating that item’s hierarchical semantic ID autoregressively.The ID’s level-specific codes are learned to match human-understandable item categories.Source: §3.2 · p. 2
3.3 Framework Overview
- The two-stage framework first learns and freezes item IDs offline, then trains a Transformer to predict IDs from user histories with hierarchy-aware embeddings and constrained decoding.Constrained decoding restricts generation to valid item prefixes.Source: §3.3 · p. 3, Figure 2 · p. 3, §3.7 · pp. 4–5
3.4 Hierarchical Tag Generation
- Hierarchical tags are generated through retrieval-then-classification: retrieve semantically similar candidates at each level, then have an LLM select among them using item content and higher-level tags.The workflow is presented as a way to generate tags without manual intervention.Source: §3.4 · pp. 3–4
3.5 Hierarchical Representation Learning
- Hierarchically supervised quantization aligns each RQ-VAE layer’s discrete codes with the corresponding level of item tags, structuring IDs into an interpretable hierarchy.Tag alignment pulls cumulative quantized embeddings toward their corresponding projected tags and away from other tags; layer-specific classifiers predict tags from those embeddings.Source: §3.5 · p. 4
3.6 Disentanglement via Uniqueness Loss
- HiD-VAE’s uniqueness loss penalizes overlap between distinct items with identical semantic IDs, encouraging an injective item-to-ID mapping.The penalty operates on continuous, pre-quantization latent vectors for colliding item pairs.Source: §3.6 · p. 4
3.7 Interpretable Generative Recommendation
- A tailored Transformer combines tag-text semantic vectors with learnable ID and level-specific type embeddings, while constrained decoding masks tokens that cannot form valid item prefixes.The semantic vectors are intended to preserve the coarse-to-fine semantic path encoded by the IDs.Source: §3.7 · pp. 4–5
3.8 Optimization
- Training proceeds in two stages: HiD-VAE minimizes a composite objective, then a frozen tokenizer’s Transformer recommender learns next-token prediction with cross-entropy.The recommender objective maximizes the likelihood of the next item’s ID sequence.Source: §3.8 · p. 5
4 Experiments
Experiments compare HiD-VAE with sequential and generative baselines on three public benchmarks, then assess its components and learned representations. Results report gains across datasets and examine collision rates, latent-space separation, and interpretability.
4.1 Experimental Settings
- Evaluation uses three public benchmarks, a 5-core setting, and leave-one-out testing; KuaiRand hierarchies are generated through an LLM-based preprocessing pipeline.The benchmarks are Beauty, Sports and Outdoors, and KuaiRand-1K; Beauty is relatively dense, while Sports and Outdoors is larger and sparser.Source: §4.1 · p. 5
4.2 Overall Performance Comparison (RQ1)
- 35.07% relative improvement in Recall@5 and 33.08% in NDCG@5 over LC-REC on Beauty; HiD-VAE also outperforms all baselines across datasets and metrics.Reported additional gains over the strongest baseline include 32.27% in NDCG@5 on Sports and 18.86% in NDCG@5 on KuaiRand; improvements are statistically significant (p<0.01).Source: §4.2 · p. 6, Table 1 · p. 6
4.3 Ablation Study (RQ2)
- Removing either tag alignment or tag prediction lowers performance, with removing tag prediction causing the larger decline; removing DUL causes the most substantial degradation.The authors report that the TIGER-style post-hoc collision fix appends arbitrary integers to identifiers, disrupting semantic integrity and confusing the downstream generative model.Source: §4.3 · pp. 6–7
4.4 Qualitative Insights and Analysis (RQ3)
- HiD-VAE reduces ID collisions to 2.8% on Sports, an 87.6% relative reduction versus VQ-Rec, while the full model's collision rates are compared across three datasets.The authors identify DUL as the primary driver; hierarchical supervision also lowers collisions relative to the variant without it.Source: §4.4 · p. 7, Table 3 · p. 7
- For the same Beauty user, HiD-VAE represents a serum with a human-readable category path, whereas standard RQ-VAE uses opaque codes and may generate invalid recommendations.The paper also says hierarchy-aware semantic embeddings capture the coarse-to-fine path, and that generation constrained by the learned tag hierarchy is mechanically robust against invalid IDs.Source: Figure 4 · p. 8, §4.4 · p. 8
5 Conclusion
HiD-VAE addresses flat, entangled semantic IDs with hierarchical supervision and a uniqueness loss. The related-work discussion situates this approach against discriminative retrieval and existing generative recommendation methods.
5 Conclusion
- HiD-VAE combines hierarchically supervised quantization with a uniqueness loss to learn interpretable, disentangled item representations and reduce ID collisions.Experiments on three benchmarks are reported to achieve state-of-the-art performance; the conclusion also identifies multimodal data and LLM-based sequential modeling as future directions.Source: §5 · p. 8
A Related Work
- Discriminative sequential recommenders separate representation learning from retrieval, using an external ANN index to retrieve candidates from large item catalogs.The passage describes this separation as motivation for the generative recommendation paradigm.Source: A Related Work · p. 10
- Generative recommendation directly generates item identifiers, but existing semantic IDs are described as flat and entangled, with collisions harming diversity and accuracy.HiD-VAE addresses these limitations through hierarchical supervision and a uniqueness loss.Source: A Related Work · p. 10
B Details on Hierarchical Tag Generation
For datasets without native hierarchical tags, HiD-VAE uses an LLM-based retrieval-then-classification pipeline. Its autoencoder objective includes reconstruction and commitment losses.
B Details on Hierarchical Tag Generation
- For datasets without native hierarchical tags, HiD-VAE uses an LLM pipeline to generate them.The pipeline uses Qwen3-235B-A22B-Instruct-2507 and hierarchical prompts that incorporate prior-level tags for consistency.Source: B Details on Hierarchical Tag Generation · p. 10
- The LLM selects tags from candidate lists using prompts containing item content, prior tags, and candidates, with classification applied sequentially at each level.Experiments use K=10 candidates per level; validation subsets achieved over 95% intra-batch consistency, and preprocessing runs offline once per dataset.Source: B Details on Hierarchical Tag Generation · p. 10, Figure 5 · p. 10
C.1 Autoencoder Objective
- The reconstruction loss uses mean squared error between the input and its reconstruction, while the commitment loss encourages the encoder output to commit to its chosen codeword.A stop-gradient operator isolates encoder updates for the commitment term; the loss is summed over all quantization stages.Source: §C.1 · p. 10
C.2 Algorithmic Overview and Implementation Details
The overview describes HiD-VAE tag generation and representation learning followed by sequential recommender training and constrained inference. Implementation notes cover decoding efficiency and an ablation for partially tagged datasets.
C.2 Algorithmic Overview and Implementation Details
- The framework generates hierarchical tags when needed, trains HiD-VAE, freezes it to map items to IDs, then trains a recommender using hierarchy-aware embeddings.The overview presents tag generation, representation learning, and sequential recommendation as the end-to-end process.Source: §C.2 · pp. 10–11
- The training loop computes reconstruction, commitment, and uniqueness losses, then updates HiD-VAE parameters before freezing the tokenizer for recommender training.The overview also notes grid-search tuning on validation sets, with τ=0.07, m=0.9, and Stage 1 batch sizes of 512 as typical values.Source: §C.2 · p. 11
- At inference, the Transformer autoregressively generates the next item ID with constrained decoding, then maps that ID to an item using a precomputed index.The implementation describes trie-based prefix masking as reducing invalid generations to zero with O(L log K) time per token, for catalogs of approximately 10^6 items.Source: §C.2 · p. 11
- For datasets with partial tags, interpolating LLM-generated and ground-truth labels using LLM confidence scores improved alignment-loss convergence by 15–20% in early epochs.Full ablation results are omitted.Source: §C.2 · p. 11
D.1 Datasets
The appendix identifies the dataset-statistics table and groups the evaluated baselines into traditional sequential, Transformer-based, and generative recommendation models.
D.1 Datasets
- Table 4 presents statistics for the experimental datasets.Source: Table 4 · p. 11
D.2 Baselines
- Traditional sequential baselines include GRU4Rec, Caser, HGN, and NextItNet, using recurrent, convolutional, gating, and dilated-convolution approaches.Source: §D.2 · p. 11
- Transformer-based baselines include SASRec and BERT4Rec, while generative baselines include TIGER, LC-Rec, and a generative adaptation of VQ-Rec.The passage characterizes VQ-Rec as a non-hierarchical contrast.Source: §D.2 · p. 11
E.1 Tag Predictor Architecture and Per-Layer Accuracy
HiD-VAE uses layer-specific tag predictors, with an architecture designed for robust hierarchical classification. Their reported accuracies remain strong across levels, including fine-grained categories.
E.1 Tag Predictor Architecture and Per-Layer Accuracy
- Each layer’s tag predictor combines self-attention, feature extraction, two residual blocks, and a classification head, with hidden dimensions and dropout scaled by layer.Batch normalization is optional; LayerNorm and ReLU appear in the feature and residual layers.Source: §E.1 · p. 12
- On Beauty, tag-prediction accuracy ranges from 96.38% at Layer 1 to 85.61% at Layer 3 despite increasing category granularity.Table 5 reports per-layer accuracy across Beauty, Sports, and KuaiRand; its category counts exclude tags with fewer than 30 samples.Source: §E.1 · p. 12, Table 5 · p. 12
- For deeper layers with 97–146 categories, accuracy remains robust against random-chance levels of approximately 0.68%–1.03%.These figures support the reported ability to predict fine-grained categories despite the increasing number of classes.Source: §E.1 · p. 12
E.2 Hyperparameter Sensitivity
The sensitivity analyses show that deeper hierarchies and uniqueness penalties have non-monotonic effects, with the reported best settings depending on the parameter. Future directions include multimodal IDs and changes to generative modeling.
E.2 Hyperparameter Sensitivity
- The sensitivity sweep excludes L=2 because preliminary experiments found severe collisions and insufficient semantic granularity for effective generative recommendation.The reported depth comparison evaluates L values of 3, 4, and 5 on Beauty and KuaiRand.Source: §E.2 · p. 12
- +4.88% Recall@10 on Beauty and +4.97% on KuaiRand accompany the increase from L=3 to L=4; L=5 then gives -5.86% Recall@10 on Beauty relative to L=4.The analysis covers Beauty and KuaiRand, and Figure 6 shows the performance pattern for Recall@10 and NDCG@10.Source: Figure 6 · p. 12, §E.2 · p. 12
- HiD-VAE uses L=3 as its default depth, describing it as a trade-off between strong performance and avoiding excessive overhead.Deeper hierarchies increase Stage 1 quantization overhead and lengthen Stage 2 sequences without proportional gains; optimization challenges are proposed as a likely factor.Source: §E.2 · p. 12
- On Beauty, β_unique = 2.0 yields Recall@10=0.0698 and NDCG@10=0.0421, the reported peak across tested weights.The passage attributes lower-weight degradation to increased ID collisions and says higher weights may over-penalize and disrupt latent-space structure.Source: §E.2 · pp. 12–13, Figure 7 · p. 12
- On Beauty, m=0.9 gives Recall@10=0.0698 and NDCG@10=0.0421, the best reported results across tested margins.The passage says lower margins allow more overlap, reducing disentanglement efficacy.Source: Figure 7 · p. 12, §E.2 · p. 13
F Future Directions
- Future directions include extending IDs to image, video, and audio, using LLMs for sequential modeling, and exploring diffusion and federated learning.The stated aims include accuracy and interpretability in heterogeneous domains, and long-tail coverage, fairness, and privacy.Source: F Future Directions · p. 13
Related papers
This paper cites
- Attention Is All You Need2017
- Auto-Encoding Variational Bayes2013
- Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer2019
- A Survey on Hallucination in Large Language Models: Principles, Taxonomy, Challenges, and Open Questions2023
- Self-Attentive Sequential Recommendation2018
- BERT4Rec: Sequential Recommendation with Bidirectional Encoder Representations from Transformer2019