All models

recbole.SRGNN

Session-based recommender that turns each click session into a graph and reads it with a gated GNN.

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 (9 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
68.8K
Operations
79
Framework
PyTorch
Recurrent
No
Published
AAAI 2019
Cited by
1,888 (as of 19 October 2026)
Authors
Shu Wu, Yuyuan Tang, Yanqiao Zhu and others
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
m8671
Graph hash
aa620e1b85641f674a5f0227e16c65ca9ab37fe6f911a1f3f809c463a8780a59
Skeleton hash
6bd1c5383340887eec6a73b2ff187ae2400ca5a806e2d83a285d7330d21575ff
Architecture hash
87b3d0ce317b7415e0b6911fba8804356ca555bfff020b71a1307f30fd9d9a80
Diagram SHA-256
e7916a7541007ef4517a43d442cc4ab9bb91270966c6117e2feb6ddb988bc8fd
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

SR-GNN is a session-based recommender: it predicts a user's next click from an anonymous sequence of clicks alone, with no user profile. Where earlier methods treated a session as a sequence, SR-GNN models each session as graph-structured data, with items as nodes and consecutive clicks as directed edges. Edge weights are normalized by the out-degree of the start node, so repeated transitions count proportionally. A gated graph neural network then propagates information along incoming and outgoing edges and updates each item vector through reset and update gates. The paper argues this captures complex transitions among items that conventional sequential methods cannot reveal.

Rather than estimating a user vector, each session is represented by its own item vectors: the last click gives the current interest, and an attention network over all items gives the global preference. The two are concatenated and linearly transformed into a hybrid session embedding, which is scored against every item and passed through a softmax.

On Yoochoose 1/64, Yoochoose 1/4 and Diginetica, the paper reports SR-GNN with the best P at 20 and MRR at 20 of all compared methods. The paper also reports SR-GNN and its variants performing stably on both short and long sessions. The RecBole implementation offers either a BPR or a cross-entropy loss and reads the number of propagation steps from its configuration. The authors released both TensorFlow and PyTorch implementations.

Key idea. SR-GNN models each anonymous click session as a directed graph, learns item vectors with a gated graph neural network, and combines current interest with attended global preference.

  • sr-gnn
  • srgnn
  • session-based recommendation
  • graph neural network
  • next click prediction
  • gated graph neural network
  • session graph
  • recommender system
  • recbole

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

Cite the paper

@misc{wu2019sessionbasedrecommendationgraphneural,
      title={Session-based Recommendation with Graph Neural Networks}, 
      author={Shu Wu and Yuyuan Tang and Yanqiao Zhu and Liang Wang and Xing Xie and Tieniu Tan},
      year={2019},
      eprint={1811.00855},
      archivePrefix={arXiv},
      primaryClass={cs.IR},
      doi={https://doi.org/10.1609/aaai.v33i01.3301346},
      url={https://arxiv.org/abs/1811.00855}, 
}