All models

MaskGR

Encoder-only transformer that recommends the next item by unmasking its semantic ID tokens with masked diffusion.

Tabular and recommender · 571 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (7 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
7M
Operations
571
Framework
PyTorch
Recurrent
No
Published
2025
Cited by
11 (as of 19 November 2026)
Authors
Kulin Shah, Bhuvesh Kumar, Neil Shah, Liam Collins
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m18334
Graph hash
d46d8d2a4baccd8c6f3fd9acc51f264fc74774a182838dc860e94bda958498fe
Skeleton hash
a1496f8807ec9bb756881a9d282613cedaad243231442a7cca83fa6ab6d7962c
Architecture hash
2c781f1f1a3e09ccfbe1fab1c17cf1c85898a736eeb03f203f87f8c64d181490
Diagram SHA-256
ed0b468b80492e5fc0f2e0ac16c01d720584470ace4470b36c3c84bc86a6631c
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

MaskGR is a recommendation model that predicts a user's next item by filling in masked tokens rather than generating them one at a time. Items are written as semantic IDs (SIDs), and earlier generative recommenders model a user's sequence of SIDs autoregressively. The paper argues that those models pay for sequential token-wise decoding at inference, may use training data inefficiently and are biased toward short-context relationships among tokens.

MaskGR models the SID sequence with masked diffusion instead. During training it masks each SID with a probability drawn uniformly from 0 to 1 and feeds the masked sequence into an encoder-only transformer, which is trained with a cross-entropy loss at the masked positions. Inference begins with all SIDs of the last item replaced by masks. Masked tokens are treated as conditionally independent given the unmasked ones, so several can be decoded in parallel.

The paper's implementation is an 8-layer encoder-only transformer with a 128-dimensional embedding and rotary position embedding. It has 8 attention heads and an MLP hidden layer of size 3072, and the paper reports 7M parameters in total. SIDs come from Flan-T5-XXL text embeddings of item metadata, clustered by residual k-means with four layers and a codebook size of 256. Against the autoregressive TIGER, the paper reports an average 21.9% increase in NDCG at 5 across its datasets.

Key idea. The paper models a user's sequence of semantic IDs with masked diffusion instead of autoregressive modeling, which allows masked tokens to be decoded in parallel.

  • MaskGR
  • Masked Diffusion for Generative Recommendation
  • masked diffusion
  • generative recommendation
  • semantic IDs
  • sequential recommendation
  • discrete diffusion
  • next item prediction
  • recommender system

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{shah2025maskeddiffusiongenerativerecommendation,
      title={Masked Diffusion for Generative Recommendation}, 
      author={Kulin Shah and Bhuvesh Kumar and Neil Shah and Liam Collins},
      year={2025},
      eprint={2511.23021},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2511.23021}, 
}