All models

recbole.GRU4RecKG

A GRU sequential recommender that reads each item together with its knowledge graph embedding.

Tabular and recommender · 17 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 (23 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
379.3K
Operations
17
Framework
PyTorch
Recurrent
No
Published
ICLR 2016
Cited by
1,604 (as of 23 October 2026)
Authors
Balázs Hidasi, Alexandros Karatzoglou, Linas Baltrunas, Domonkos Tikk
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
m8624
Graph hash
0f90300b06db12d5f31ea1d56ba9ad0786de581b1211adb98a46b8decb51fac7
Skeleton hash
0a1c1151444d26c8e21ca3b977bcaf58410583aaabb4eea508546ae56af2074c
Architecture hash
79957013946fc673039b52a2c37b72875187f9912770f3e65d5a20236428aab1
Diagram SHA-256
adc5cd5ef559e266686afd705c489d0514bfb9484c79132793abc6541a0af191
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

GRU4RecKG is an extension of GRU4Rec, a sequential recommender: it feeds the GRU each item in a user's sequence concatenated with that item's knowledge graph embedding. The knowledge graph embeddings are pre-trained, and by default they stay frozen during training. With the default 'CE' loss, training is treated as a multi-class classification task with the target item as the ground truth, so negative sampling is not needed.

GRU4Rec itself comes from a paper that applied recurrent neural networks to recommender systems that must work from short session data instead of long user histories. Its argument is that modeling the whole session gives more accurate recommendations. That paper also adapted classic RNNs to the task, for example with a ranking loss function. Among the architectures it examined, a single layer of GRU units was found to be the best performer.

Key idea. GRU4RecKG extends GRU4Rec by concatenating each item with its corresponding knowledge graph embedding as the input to the GRU.

  • gru4reckg
  • gru4rec kg
  • gru4rec-kg
  • sequential recommendation
  • session-based recommendation
  • knowledge graph embedding
  • gru recommender
  • recbole gru4reckg

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

Cite the paper

@misc{hidasi2016sessionbasedrecommendationsrecurrentneural,
      title={Session-based Recommendations with Recurrent Neural Networks}, 
      author={Balázs Hidasi and Alexandros Karatzoglou and Linas Baltrunas and Domonkos Tikk},
      year={2016},
      eprint={1511.06939},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/1511.06939}, 
}