recbole.GCSAN
A session recommender that runs a graph network over the click graph before self-attention.
Tabular and recommender · 120 operations Checked
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
- 253.2K
- Operations
- 120
- Framework
- PyTorch
- Recurrent
- No
- Published
- IJCAI 2019
- Cited by
- 663 (as of 19 October 2026)
- Authors
- Chengfeng Xu, Pengpeng Zhao, Yanchi Liu and others
- Source
- recbole 1.2.1
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m8620
- Graph hash
- 8ee72d63d0f3a690ca3616df9613a5f910151bc24102659e77bb8790dcac997b
- Skeleton hash
- d6748c6bbf5cba4553a46342f500bf89861a54cdcba7a749fc177fa80c4f7d8a
- Architecture hash
- 4f83a8966dec79d331350006bfc179bb7db7e14f5669c18a9cbddd350021d21a
- Diagram SHA-256
- f6ab0a91cc86af646cec2a3a4d7005c2115fc0f44a594070d557b9e1b44f3030
- 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
GC-SAN, the Graph Contextualized Self-Attention Network, is a session-based recommender that predicts a user's immediate next action from an anonymous session. Its starting point is that self-attention networks capture long-range dependencies but lack the local dependencies that exist over adjacent items. GC-SAN therefore builds a graph from each session, runs a graph neural network over it for local dependencies, then applies self-attention for long-range ones. Each session is finally represented as a linear combination of the global preference and the current interest, where the current interest is simply the last clicked item's vector.
In the session graph, each click is a node and each consecutive pair of clicks is an edge, with edge weights normalized by the occurrence of the edge divided by the out-degree of its start node. The paper reports the best results among its baselines on Diginetica and Retailrocket in hit rate, MRR and NDCG. An ablation that replaced the graph network with randomly initialized item embeddings still beat STAMP on Retailrocket but fell behind GRU4Rec on Diginetica.
The paper's self-attention layer uses a single head; this RecBole version swaps in a unified transformer component and applies regularization only to the embeddings. The weight between the self-attention representation and the last click matters: the paper found values from 0.4 to 0.8 most desirable.
Key idea. GC-SAN strengthens self-attention with a gated graph neural network over the session graph, pairing local item transitions with long-range dependencies for next-click prediction.
- gc-san
- gcsan
- graph contextualized self-attention network
- session-based recommendation
- graph neural network
- self-attention
- next-item prediction
- session graph
- recbole
- e-commerce
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@inproceedings{Xu_2019, series={IJCAI-2019}, title={Graph Contextualized Self-Attention Network for Session-based Recommendation}, url={http://dx.doi.org/10.24963/ijcai.2019/547}, DOI={10.24963/ijcai.2019/547}, booktitle={Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence}, publisher={International Joint Conferences on Artificial Intelligence Organization}, author={Xu, Chengfeng and Zhao, Pengpeng and Liu, Yanchi and Sheng, Victor S. and Xu, Jiajie and Zhuang, Fuzhen and Fang, Junhua and Zhou, Xiaofang}, year={2019}, month=Aug, pages={3940–3946}, collection={IJCAI-2019} }