All models

recbole.GRU4RecCPR

GRU4Rec with its output softmax layer replaced by softmax-CPR, for next-item recommendation.

Tabular and recommender · 79 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 (8 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
323.8K
Operations
79
Framework
PyTorch
Recurrent
No
Published
WSDM 2024
Cited by
11 (as of 22 October 2026)
Authors
Haw-Shiuan Chang, Nikhil Agarwal, Andrew McCallum
License
MIT
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
m8622
Graph hash
6588bc6a083846f159a7c6d34557c46547928998ab4146ec5b71c01117d90acc
Skeleton hash
8767dacb793cd0988f397ecd9559bac5cca2248986190dc44333cf4d904cd3bd
Architecture hash
aea1c5f5656d0c8dad4a7bf15e1bb3a7702a10aab25473ca4a8f6ae0aa2b5b1b
Diagram SHA-256
5539e5614ab0756a2a5834856f94eaf07c665b3645736b535d6751ea040bba2b
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

GRU4RecCPR is a sequential recommender: it takes the item history of a user and outputs a probability distribution over the next item. It is GRU4Rec, a recurrent sequential recommendation model, with simple modifications to the output softmax layer that replace it with softmax-CPR. The paper behind it found that the usual softmax output layer, with its single hidden state and static item embeddings, prevents neural sequential recommenders from learning when users copy items from their history and when they exclude them.

Softmax-CPR combines three methods: context partition, pointer network and reranker partition. It uses different hidden states to compute the probabilities of different partitions of items, for example one hidden state for the items already in the input sequence and another for the rest. The method was originally proposed to reduce hallucinations in language generation models, and the paper adapts it to recommendation.

With almost the same model size, the paper reports that its best method improves the average NDCG at 10 of GRU4Rec by 10% on 5 datasets with duplicated items and by 24% on 7 datasets without them. It also reports that the improvement on GRU4Rec is slightly larger than that on SASRec. In those experiments GRU4Rec used 1 layer and an item embedding size of 64.

Key idea. The paper identified the softmax layer's single hidden state and static item embeddings as a major source of difficulty with repeated items, and adapted softmax-CPR to SASRec and GRU4Rec.

  • GRU4RecCPR
  • GRU4Rec CPR
  • softmax-CPR
  • sequential recommendation
  • next item prediction
  • repeated items
  • softmax bottleneck
  • pointer network
  • RecBole

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

Cite the paper

@misc{chang2023copycopycriticalissue,
      title={To Copy, or not to Copy; That is a Critical Issue of the Output Softmax Layer in Neural Sequential Recommenders}, 
      author={Haw-Shiuan Chang and Nikhil Agarwal and Andrew McCallum},
      year={2023},
      eprint={2310.14079},
      archivePrefix={arXiv},
      primaryClass={cs.IR},
      url={https://arxiv.org/abs/2310.14079}, 
}