Bidirectional Across Items, Sequential Within IDs: Hierarchy-Preserving Masked Discrete Diffusion for Generative Recommendation was submitted to arXiv on 2026-11-27 by Katherine Tieu, Dongqi Fu, Si Zhang, Hanqing Zeng, Chenglin Wei, Yinglong Xia and others. Read it on arXiv or as a PDF.
Key findings
- On three Amazon domains (Industrial and Scientific, Office Products, and Baby Products), HPD achieved higher Hit Rate and NDCG at every evaluated cutoff (HR@3, 5, 10 and NDCG@3, 5, 10) than its matched autoregressive counterpart for both Qw3n3-8B versus LLaDA-8B-Base and Qw3n2.5-7B versus Dream-7B-Base.
- In the 8B model comparison using LLaDA-8B-Base across the three Amazon datasets, HPD obtained the best or tied-best score across all 18 reported metric-domain combinations against autoregressive and alternative diffusion objectives.
- On the Industrial and Scientific domain with Dream-7B-Base, HPD reached 0.0906 HR@10 and 0.0558 NDCG@10, outperforming AR-LLM with Qw3n2.5-7B (0.0285 HR@10, 0.0189 NDCG@10), DiffGRM (0.0605 HR@10, 0.0433 NDCG@10), and standard MDLM (0.0846 HR@10, 0.0536 NDCG@10).
- On Office Products and Baby Products with Dream-7B-Base, standard MDLM achieved higher scores than HPD across all cutoffs (such as HR@10 of 0.0573 versus 0.0546 on Office, and 0.0374 versus 0.0331 on Baby), while HPD exceeded AR-LLM (0.0046 on Office, 0.0060 on Baby) and DiffGRM (0.0194 on Office, 0.0125 on Baby) on all cutoffs.
- In ablation experiments, jointly training all model parameters after initializing semantic ID tokens outperformed training only the token embeddings and output weights on all six metrics, improving HR@10 from 0.0762 to 0.0906 for Dream-7B-Base on Industrial and from 0.0072 to 0.0207 for LLaDA-8B-Base on Baby Products.
The main takeaway. Separating bidirectional cross-item attention from coarse-to-fine intra-item masking enables diffusion language models to outperform matched causal autoregressive models across evaluated cutoffs on three Amazon product recommendation benchmarks. The relative advantage of prefix-independent masking over standard discrete diffusion varies across domains, with standard masking performing better on Office and Baby products with Dream-7B-Base.
The abstract, as written
Generative recommendation represents items with hierarchical semantic IDs (SIDs) and casts next-item prediction as sequence generation. Autoregressive language models preserve the coarse-to-fine order imposed by residual quantization but apply the same causal factorization across the interaction sequence. Masked discrete diffusion enables bidirectional learning across items; however, independently masking SID components can expose a fine residual code while hiding its required coarse prefix. We introduce Hierarchy-Preserving Diffusion (HPD), a masked discrete diffusion language modeling formulation that separates two dependency levels: (1) Across SIDs, full self-attention captures relations across the interaction sequence. (2) Within each SID, prefix-independent masking restricts each corrupted sequence to an observed prefix followed by a masked suffix. HPD combines this corruption with a training pipeline that first optimizes new SID-token embeddings and output weights with a fixed backbone and then jointly optimizes all parameters. Catalog-constrained beam search decodes the target SID from coarse to fine. HPD requires no task-specific architectural changes. Across three domains, Industrial and Scientific, Office Products, and Baby Products, we compare Qwen3-8B/LLaDA-8B-Base and Qwen2.5-7B/Dream-7B-Base autoregressive/diffusion large language model (AR-LLM/dLLM) pairs. At the final checkpoint, HPD achieves higher Hit Rate and NDCG than its matched AR-LLM at every evaluated cutoff. In the 8B LLaDA comparison, HPD obtains the best or tied-best score across all 18 metric–domain combinations. Comparisons with standard MDLM and DiffGRM evaluate HPD against alternative masked discrete diffusion objectives. An ablation shows that the proposed HPD pipeline outperforms the SID-token-only variant on every metric for Dream-7B-Base on Industrial and Scientific and LLaDA-8B-Base on Baby Products.
Key terms
- Semantic IDs (SIDs): Hierarchical discrete token sequences that represent items by mapping continuous item text embeddings into a coarse-to-fine structure.
- Residual-Quantized K-means (RQ-KMeans): A clustering algorithm that assigns an item a sequence of discrete codebook centroids, where each centroid quantizes the residual vector left by earlier levels.
- Masked Discrete Diffusion Language Modeling (MDLM): A generative language modeling approach that trains non-causal neural networks to reconstruct discrete tokens that were stochastically replaced by mask tokens.
- Prefix-Independent Masking: A structured noise process that forces any corrupted semantic ID to consist of an observed coarse prefix followed by an all-masked suffix.
- Catalog-Constrained Beam Search: A decoding procedure that unmasks semantic ID tokens sequentially while pruning any partial sequences that do not match valid items in the catalog.
What the authors say it means
- The authors conclude that generative recommendation benefits from decoupling item-level dependencies, which are non-causal, from intra-item dependencies, which are inherently sequential due to residual quantization.
- The authors note that masked discrete diffusion can be applied effectively to residual semantic IDs without changing the underlying transformer backbone architecture.
- The authors conclude that updating all model parameters rather than only training newly added semantic ID token embeddings is necessary for diffusion language models to adapt to recommendation sequences.
- The authors observe that while prefix-independent masking consistently surpasses causal autoregressive models across domains, its performance relative to standard discrete diffusion varies depending on the specific product domain.
What to do with it
- Evaluate masked discrete diffusion backbones with bidirectional attention across items when developing generative next-item recommendation systems instead of relying solely on causal autoregressive factorization. Supported by: On three Amazon domains across two model pairs, HPD achieved higher Hit Rate and NDCG than matched autoregressive models at every evaluated cutoff, obtaining the best or tied-best score across all 18 metric-domain combinations in the 8B comparison.
- Structure discrete diffusion corruption to mask semantic ID components only from fine to coarse rather than masking components independently when working with residual-quantized items. Supported by: HPD outperformed DiffGRM on Dream-7B-Base across all three domains at every cutoff, including reaching HR@10 of 0.0906 versus 0.0605 on Industrial and Scientific, and HR@10 of 0.0546 versus 0.0194 on Office Products.
- Jointly fine-tune all model parameters after initializing newly added semantic ID token embeddings and output weights rather than freezing the backbone. Supported by: In ablation experiments, training all parameters improved HR@10 from 0.0762 to 0.0906 on Industrial and Scientific for Dream-7B-Base, and from 0.0072 to 0.0207 on Baby Products for LLaDA-8B-Base.
- Benchmark prefix-independent diffusion against standard discrete token masking on target domain catalogs before deploying a specific masking policy. Supported by: On Office Products and Baby Products with Dream-7B-Base, standard MDLM achieved higher scores across all six cutoffs than HPD, such as reaching HR@10 of 0.0573 versus 0.0546 on Office Products and 0.0374 versus 0.0331 on Baby Products.
Caveat. The empirical findings are limited to three Amazon product domains using three-level semantic IDs and two specific pairs of 7B and 8B autoregressive and diffusion models. Furthermore, on Office Products and Baby Products with Dream-7B-Base, standard MDLM achieved higher Hit Rate and NDCG across all evaluated cutoffs than HPD, showing that the benefit of prefix-independent masking over standard discrete diffusion is domain-dependent.
In short
The paper presents Hierarchy-Preserving Diffusion to address the mismatch between bidirectional attention across items and sequential dependencies within hierarchical semantic IDs. Across three Amazon benchmark domains, HPD achieved higher Hit Rate and NDCG than matched autoregressive baselines at all tested cutoffs, while scoring best or tied-best across all 18 metric-domain pairs in the 8B LLaDA evaluation. Its relative performance against standard discrete diffusion depends on the domain, with standard masking achieving higher metrics on two of the three evaluated categories with Dream-7B-Base.
Written from the paper's own text. Quoted passages are verbatim and the numbers are the authors' own. For the method and full results, read the paper.