Source-linked AI summary

Global Context Enhanced Graph Neural Networks for Session-based Recommendation

Ziyang Wang, Wei Wei, Gao Cong, Xiao-Li Li, Xian-Ling Mao, Minghui Qiu

arXiv:2106.05081v1cs.IR

TL;DR

Session-based recommendation must infer the next item from anonymous sequences despite limited user history and potentially irrelevant information from other sessions. GCE-GNN combines session-graph and global-graph representations with attention, and the paper reports consistent improvements over nine baselines across three datasets. An author-reported caveat is that performance can suffer when position information does not capture distance to the predicted item.

  • Problem

    Session-based recommendation must predict the next item from anonymous behavior sequences when user profiles or long-term historical interactions are unavailable or limited.

  • Method

    GCE-GNN learns session-level and global-level item embeddings from session and global graphs, incorporates position and session information, and combines representations with attention.

  • Results

    GCE-GNN significantly outperforms nine baselines, including state-of-the-art methods, in experiments on three real-world datasets.

  • Takeaways & Limitations

    Modeling local session context together with global item-transition context provides the paper’s reported basis for improving session-based recommendation.

  • Takeaways & Limitations

    The position-vector variant without reversed position information does not perform well on all datasets because it cannot capture each item’s distance from the predicted item.

Abstract

from arXiv · show

Session-based recommendation (SBR) is a challenging task, which aims at recommending items based on anonymous behavior sequences. Almost all the existing solutions for SBR model user preference only based on the current session without exploiting the other sessions, which may contain both relevant and irrelevant item-transitions to the current session. This paper proposes a novel approach, called Global Context Enhanced Graph Neural Networks (GCE-GNN) to exploit item transitions over all sessions in a more subtle manner for better inferring the user preference of the current session. Specifically, GCE-GNN learns two levels of item embeddings from session graph and global graph, respectively: (i) Session graph, which is to learn the session-level item embedding by modeling pairwise item-transitions within the current session; and (ii) Global graph, which is to learn the global-level item embedding by modeling pairwise item-transitions over all sessions. In GCE-GNN, we propose a novel global-level item representation learning layer, which employs a session-aware attention mechanism to recursively incorporate the neighbors' embeddings of each node on the global graph. We also design a session-level item representation learning layer, which employs a GNN on the session graph to learn session-level item embeddings within the current session. Moreover, GCE-GNN aggregates the learnt item representations in the two levels with a soft attention mechanism. Experiments on three benchmark datasets demonstrate that GCE-GNN outperforms the state-of-the-art methods consistently.

1 INTRODUCTION

Session-based recommendation predicts the next item from anonymous behavior sequences, but prior methods often rely only on the current session and may miss useful transitions from other sessions. GCE-GNN addresses this by combining session-level and global-level item-transition modeling.

  • Session-based recommendation predicts the next interested item from an anonymous behavior sequence when user profiles or long-term histories are unavailable.
  • Earlier similarity-based methods neglect sequential patterns, while chain-based methods can become computationally intractable as the item set grows.
  • RNN, memory-network, and session-graph approaches may inadequately model complicated item-transition dependencies or rely heavily on the last item’s relevance.
  • Other sessions can provide useful transitions but may also introduce irrelevant information, making selective global-context modeling challenging.
  • GCE-GNN learns session-level embeddings from the current session graph and global-level embeddings from transitions across sessions, then combines them with soft attention.
  • The paper reports that GCE-GNN outperforms nine baselines, including state-of-the-art methods, on three real-world datasets.

2 RELATED WORK

Related work on session-based recommendation includes Markov-chain, neural, graph-neural-network, and collaborative-filtering approaches. These methods differ in how they model sequential behavior, attention, session graphs, and item similarity.

  • Markov Chain-based SBR: FPMC adapts first-order Markov chains and matrix factorization to anonymous session-based recommendation by omitting unavailable user representations.
  • Deep-learning based SBR: GRU4REC applies multilayer gated recurrent units to model item interaction sequences, while later neural methods add augmentation or attention.
  • Graph-based SBR: SR-GNN builds a graph from the current session, learns item embeddings with a gated GNN, and uses attention based on each item’s relevance to the last item.
  • Collaborative Filtering-based SBR: Item-KNN recommends items similar to the current session’s last item, while KNN-RNN combines co-occurrence-based KNN with GRU4REC.

3 PRELIMINARIES

The paper represents session behavior at two graph levels: a session graph captures transitions within the current session, while a global graph captures transitions across sessions. These graphs provide local and global item representations for session-based recommendation.

  • Graph models: The method uses session and global graphs to capture different levels of pairwise item-transition information for item representation learning.
  • Problem statement: Session-based recommendation recommends the top-N items most likely to be clicked next from the item set, given an anonymous session.
  • Session Graph Model: A session graph models sequential patterns between adjacent items in the current session and learns session-level item embeddings through a GNN.
  • Session Graph Model: The session graph distinguishes incoming, outgoing, combined, and self-transition edge types.
  • Session Graph Model: Session graphs capture complicated graph patterns within a session more efficiently than traditional sequence-focused deep-learning approaches.
  • Global Graph Model: The global graph links item pairs from all sessions, including the current session, to learn global-level item embeddings.
  • Global Graph Model: The ε-neighbor scope favors short-range transitions because beyond-scope dependencies may be unhelpful or noisy, and global transition direction is not distinguished for efficiency.
  • Global Graph Model: For efficiency, global-graph edges are weighted by frequency, only the top-N neighbors per item are retained, and the topology is not dynamically updated during testing.

4 THE PROPOSED METHOD

GCE-GNN combines global and session graphs to learn contextual item representations, then uses position-aware attention to construct session representations and score candidate items.

  • Global and session representations: GCE-GNN learns global-level item embeddings from all sessions and session-level embeddings from the current session’s item transitions.Its four components comprise global item representation learning, session item representation learning, session representation learning, and prediction.
  • Global-level item representation learning layer: The global encoder uses session-aware attention to prioritize neighbors whose features match the current session’s preference.This replaces indiscriminate mean pooling with affinity-dependent propagation over global-graph neighbors.
  • Global-level item representation learning layer: Multiple aggregation layers incorporate an item’s initial representation and neighbors up to k hops away.A single layer combines the item with immediate neighbors; extending the aggregator captures higher-order connectivity.
  • Session-level item representation learning layer: The session encoder applies attention over directed session-graph neighbors, reducing noise while aggregating each item with its local context.Attention coefficients are asymmetric and normalized across neighboring nodes.
  • Session representation learning layer: The model combines global and session context, then uses reversed position information and soft attention to weight items when forming the session representation.Reversed positions reflect each item’s distance from the prediction target, while the framework ultimately scores candidate items.

5 EXPERIMENTS

The experiments evaluate GCE-GNN across three benchmark datasets and five research questions covering overall accuracy, graph design, position embeddings, aggregation, and hyperparameters.

  • Research questions: The evaluation asks whether GCE-GNN outperforms state-of-the-art session-based recommendation baselines on real-world datasets.This is the first research question guiding the experiments.
  • Research questions: Additional questions test the global graph, global encoder, receptive-field depth k, reversed position embedding, aggregation operations, and hyperparameter settings.Node dropout is included among the hyperparameters examined.
  • Datasets: Experiments use Diginetica, Tmall, and Nowplaying as benchmark datasets.They represent transaction, online shopping, and music-listening behavior, respectively.
  • Experimental setup: Preprocessing filters sessions of length one and items appearing fewer than five times, with the latest week reserved for testing.Historical data are used for training, and sequence splitting generates training and testing examples.

5.2 Evaluation Metrics

The evaluation compares GCE-GNN with classic and state-of-the-art session-based recommendation methods using ranking-based metrics.

  • Metrics: Performance is measured with the ranking metrics P@N and MRR@N.The metrics follow prior session-based recommendation work.
  • Baselines: The baseline set includes popularity, similarity, Markov-chain, recurrent, attention, memory-network, and graph-neural-network methods.These include POP, Item-KNN, FPMC, GRU4Rec, NARM, STAMP, SR-GNN, FGNN, and CSRM.
  • Baselines: STAMP and SR-GNN emphasize the last item when computing session-level representations.STAMP uses self-attention centered on the last item, while SR-GNN combines graph embeddings with last-item self-attention.
  • Baselines: CSRM uses a memory network to incorporate the latest m sessions when predicting the current session’s intent.This provides a collaborative-information baseline for comparison with GCE-GNN.

5.4 Parameter Setup

The experiments use fixed latent-vector and mini-batch settings with consistent hyperparameters across models, then compare GCE-GNN against traditional, neural, memory, and graph-based baselines. GCE-GNN achieves statistically significant best performance across three datasets and both reported metrics, while its global and local context integration improves over SR-GNN and FGNN.

  • Parameter Setup: Latent vectors are fixed at dimension 100 and mini-batches at size 100 for all models, with consistent hyperparameters for fair comparison.CSRM uses memory size 100, while FGNN uses three GNN layers and eight heads.
  • Overall Comparison: GCE-GNN achieves the best statistically significant performance across all three datasets for both metrics at N=10 and N=20.The comparison includes nine baselines and the proposed model.
  • Baseline Comparison: Traditional methods differ in modeling choices: POP recommends frequent items, FPMC combines first-order Markov chains with matrix factorization, and Item-KNN uses item similarity.Item-KNN performs best among traditional methods on Diginetica and Nowplaying but does not model chronological order.
  • Baseline Comparison: Neural methods generally outperform traditional methods, while RNNs alone may be insufficient because session-based recommendation involves changing preferences within a session.NARM and STAMP significantly outperform GRU4REC, and STAMP benefits from assigning different attention weights to session items.
  • Baseline Comparison: CSRM benefits from other-session item transitions but treats sessions as whole units and uses memory networks with limited slots.Graph-based methods perform better on Diginetica and Nowplaying, supporting graph modeling for session-based recommendation.
  • Overall Comparison: 6.86% on Diginetica, 16.34% on Tmall, and 15.71% on Nowplaying are GCE-GNN’s average improvements over SR-GNN.GCE-GNN also outperforms FGNN on all three datasets.

5.6 Impact of Global Feature Encoder (RQ2)

The global feature encoder is evaluated through contrast models that remove or vary global and session-level components. Results show that global context improves performance, while the preferred exploration depth and aggregation operation depend on the dataset.

  • Contrast Models: The contrast study removes the global encoder, removes the session encoder, or uses one-hop and two-hop global encoders.These variants test local-only, global-only, and different global-neighborhood depths.
  • Global Feature Encoder: Adding a global-level feature encoder improves performance over the model without global context by using item-transition information from other sessions.The two-hop encoder outperforms the one-hop encoder on Diginetica.

5.7 Impact of Position Vector (RQ3)

The study compares reverse-position attention with forward-position and self-attention variants, finding that reversed position embedding performs best and can filter session noise.

  • Reversed position embedding with the proposed attention network outperforms forward-position and self-attention variants.Table 4 reports this comparison across the evaluated datasets.
  • GCE-GNN-NP performs poorly across all datasets because it cannot capture each item's distance from the predicted item.This distance information is important when training sessions have varying lengths.
  • GCE-GNN-SA outperforms GCE-GNN-NP on three datasets, indicating that the last item carries highly relevant recommendation information.However, GCE-GNN-SA performs poorly on Tmall because it lacks a comprehensive judgment of each item's contribution.
  • The reverse-position design more accurately suggests item importance, while attention helps filter noise in the current session.These effects are presented as explanations for the stronger performance of the proposed variant.
  • Impact of Aggregation Operations: Sum pooling outperforms gating, max pooling, and concatenation on Diginetica and Tmall for Recall@20 and MRR@20.Max pooling is worst on Diginetica but performs best among the three aggregators on Tmall for MRR@20.

5.9 Impact of Dropout Setting (RQ5)

Dropout controls overfitting in GCE-GNN: too little dropout performs poorly, moderate settings perform best, and excessive dropout degrades performance.

  • Dropout randomly removes neurons during training with probability p while retaining all neurons during testing.
  • Large dropout ratios reduce performance because limited available neurons make learning from the data difficult.

6 CONCLUSION

The paper presents GCE-GNN, a graph-neural architecture that combines local session and global context with reversed position information for session-based recommendation. Across three benchmark datasets, it significantly outperforms nine baselines consistently.

  • GCE-GNN converts sessions into session graphs, constructs a global graph, and combines local and global item context.
  • Reversed position vectors and session information help GCE-GNN learn each item's contribution to recommendation.
  • GCE-GNN significantly outperforms nine baselines consistently across three benchmark datasets.
Loading 2106.05081v1…