Source-linked AI summary

Exploiting Cross-Session Information for Session-based Recommendation with Graph Neural Networks

Ruihong Qiu, Zi Huang, Jingjing Li, Hongzhi Yin

arXiv:2107.00852v2cs.IR

TL;DR

Existing session-based recommenders inadequately represent complicated item dependencies and cannot use cross-session information when sessions are anonymous. The paper combines graph-based session modeling with BCS graphs and Mask-Readout, and reports superiority over state-of-the-art methods on two large-scale benchmark datasets.

  • Problem

    Existing methods rely on individual-session sequences that inadequately capture complicated item dependencies and omit cross-session information in anonymous-session settings.

  • Method

    The paper represents sessions as graphs with FGNN, connects sessions through BCS graphs, and uses Mask-Readout to emphasize the original session during embedding.

  • Results

    The proposed solution demonstrated superiority over state-of-the-art techniques on two large-scale benchmark datasets.

  • Takeaways & Limitations

    Graph-based modeling and cross-session information are presented as effective for learning more expressive session embeddings in anonymous session-based recommendation.

  • Takeaways & Limitations

    Larger BCS neighborhoods become noisier and require random sampling, restricting further performance gains as neighborhood width increases.

Abstract

from arXiv · show

Different from the traditional recommender system, the session-based recommender system introduces the concept of the session, i.e., a sequence of interactions between a user and multiple items within a period, to preserve the user's recent interest. The existing work on the session-based recommender system mainly relies on mining sequential patterns within individual sessions, which are not expressive enough to capture more complicated dependency relationships among items. In addition, it does not consider the cross-session information due to the anonymity of the session data, where the linkage between different sessions is prevented. In this paper, we solve these problems with the graph neural networks technique. First, each session is represented as a graph rather than a linear sequence structure, based on which a novel Full Graph Neural Network (FGNN) is proposed to learn complicated item dependency. To exploit and incorporate cross-session information in the individual session's representation learning, we further construct a Broadly Connected Session (BCS) graph to link different sessions and a novel Mask-Readout function to improve session embedding based on the BCS graph. Extensive experiments have been conducted on two e-commerce benchmark datasets, i.e., Yoochoose and Diginetica, and the experimental results demonstrate the superiority of our proposal through comparisons with state-of-the-art session-based recommender models.

1 INTRODUCTION

Session-based recommendation targets a user's latest preference, but existing methods often model sessions as short sequences and omit cross-session information. This paper addresses both limitations with graph-based session modeling and cross-session graph augmentation.

  • Traditional recommender systems use historical interactions, which can neglect shifts in a user's preference over time.
  • Session-based recommendation predicts the next item from the user's current session to capture latest preference.
  • Existing methods model sessions as short sequences, limiting representation of complicated non-sequential item dependencies and excluding cross-session information.
  • The paper formulates two goals: modeling complicated item dependencies and incorporating cross-session information into anonymous sessions.
  • FGNN represents sessions as graphs and applies graph neural networks to learn item and session embeddings.
  • BCS graphs incorporate cross-session information, while Mask-Readout emphasizes items from the original session when generating embeddings.

2 RELATED WORK

Related work spans general recommendation, sequential and session-based methods, cross-session modeling with user identifiers, and graph neural networks. Anonymous sessions limit user-based linkage, motivating graph-based alternatives.

  • General recommender systems include content-based and collaborative filtering methods that learn preferences from historical user-item interactions.
  • Sequential recommendation methods model item dependencies with Markov chains, decision processes, or recurrent neural networks.
  • Cross-session session-based methods commonly connect sessions through an identified user and aggregate information across that user's history.
  • Anonymous online systems may lack user IDs, making this user-based access to other sessions impossible.
  • Graph neural network research learns node or graph representations by aggregating information from neighboring nodes.

3 PRELIMINARIES

The preliminaries describe graph neural networks for representation learning and graph classification. Node features are iteratively aggregated from neighborhoods, then a permutation-invariant readout produces a graph-level representation.

  • GNNs use graph structure and node feature vectors to learn representations of nodes or graphs.
  • After k iterations, node representations capture node information and structural information within k-hop neighborhoods.
  • The first layer receives node feature vectors, while Agg aggregates neighboring features and Map transforms self and neighboring information.
  • For graph classification, a Readout function aggregates final-layer node features into a graph-level representation.
  • The Readout function is required to be permutation invariant.

4 METHOD

FGNN converts a session into a graph-based pipeline that encodes node features with WGAT and produces a session embedding through Mask-Readout before scoring recommendation candidates.

  • The FGNN pipeline takes a BCS graph converted from the input session as its model input.
  • WGAT layers encode node features while preserving the session graph structure and producing semantic node representations.
  • Mask-Readout generates a session embedding from the learned node features.
  • The model finally generates recommendation scores for items in the item set.

4.1 Problem Definition and Notation

Session-based recommendation predicts the next item for an anonymous user from the current session. The session is an ordered list of item interactions, and the model uses cross-session information as additional input.

  • An SBRS predicts the next item matching an anonymous user’s preference from interactions within the current session.
  • The item universe V contains m unique items, while a session S is an ordered list of n items from V.
  • A session may contain duplicated items, so positions p and q can refer to the same item when p,q < n.

4.2 BCS Graph

The BCS Graph extends an individual session graph with item relationships gathered across sessions. It is built from a global graph and sampled with n-hop neighbors, while neighbor sampling controls growth for popular items.

  • Basic session graph: Each session sequence is converted into a weighted directed graph whose nodes are items and whose edge weights count within-session transition frequency.Self-loops with weight 1 are added when needed for WGAT self-attention.
  • Global graph: A global graph unifies all training sessions by collecting their items and dependency edges, with edge weights defined as in the basic session graph.Different session graphs are united when items re-occur.
  • BCS graph sampling: The BCS graph samples the session’s items together with their n-hop neighbors from the global graph, reducing to the basic session graph when n = 0.Increasing n adds first- and second-order neighbors around the input session.
  • Node representation: WGAT propagates information through the graph while incorporating edge weights during attention aggregation to compute node representations.A two-layer GNN computes the final representation of a node through successive propagation steps.
  • Sampling control: Random neighbor selection based on edge weights controls BCS graph scale, because popular items may otherwise bring in many neighboring nodes.The edge weight indicates the popularity of the following node.
  • Cross-session information: BCS connectivity incorporates extra item relationships from other sessions without requiring similarity calculations between sessions.Compared with the basic session graph, the BCS graph contains more nodes and edges derived from cross-session relationships.

4.3 Weighted Graph Atentional Layer

WGAT learns node embeddings in weighted, directed session graphs by aggregating neighbor information with edge-aware attention. Multiple attention heads stabilize this process, and their outputs are averaged into item-level embeddings.

  • Weighted Graph Attentional Layer: WGAT propagates information through weighted, directed session graphs while incorporating edge weights into attention aggregation.This design preserves information carried by the session graph's weighted directed edges.
  • Weighted Graph Attentional Layer: Each WGAT layer maps initial node features to new node features through attention-based neighborhood aggregation.Initial item embeddings are generated from one-hot item encodings through an embedding layer.
  • Weighted Graph Attentional Layer: For each node, self-attention aggregates information from its incoming neighbors, using node features and edge weights to compute influence coefficients.The entire neighborhood is considered because session graphs are small, and attention is restricted to first-order neighbors.
  • Weighted Graph Attentional Layer: A softmax converts neighbor attention coefficients into comparable probability weights, while the implementation uses an MLP with LeakyReLU for the attention function.The reported negative input slope for LeakyReLU is α = 0.2.
  • Weighted Graph Attentional Layer: Multi-head attention is used to stabilize self-attention training, and the resulting head outputs are averaged to obtain the expected item-embedding dimension.After multiple WGAT layers, the final node feature vectors serve as item-level embeddings for session embedding computation.

4.4 Mask-Readout Function

Mask-Readout generates a BCS-graph representation while preserving the greater importance of the current session. It masks nodes outside the original session range rather than reading all nodes equally.

  • Mask-Readout Function: Mask-Readout generates an updated BCS-graph representation from node features after GNN computation.Its purpose is to represent item dependencies without relying on time order or potentially inaccurate attention to the last input item.
  • Mask-Readout Function: The Readout function recursively uses query vectors to control what is read from node embeddings and to process the nodes in an order.Each output combines the query vector with a semantic embedding vector.
  • Mask-Readout Function: Mask-Readout masks all nodes outside G_BCS−0 so the graph embedding preserves the original session within the BCS graph.This prevents the current session's representation from being diluted by nodes from other sessions.
  • Mask-Readout Function: Basic Readout uses all BCS-graph nodes, whereas Mask-Readout restricts aggregation to the original session range to preserve relative session importance.The BCS graph can vary in size depending on the selected neighborhood.

4.5 Recommendation

The recommendation stage converts the graph-level embedding into scores for every item, normalizes them into probabilities, and selects the highest-probability items for top-K recommendation.

  • Recommendation: The graph-level embedding is used to compute a recommendation score for every item in the full item set.The output mapping applies a linear transformation to the graph embedding before combining it with initial item embeddings.
  • Recommendation: A softmax transforms the item score vector into a probability distribution over the item set.These probabilities provide the basis for ranking candidate items.
  • Recommendation: Top-K recommendation selects the K items with the highest probabilities.The selection is performed over all items using the normalized recommendation probabilities.

4.6 Objective Function

FGNN is trained as a graph-level classification model using the labeled next item and a multi-class cross-entropy objective, with BPTT training over the whole model.

  • Objective Function: The labeled target item supervises the model through the recommendation probability assigned to that item.The target is represented using its one-hot encoding.
  • Objective Function: The objective is multi-class cross entropy between the predicted item distribution and the one-hot encoding of the label item.The loss is defined for a batch of training sessions.
  • Objective Function: Back-Propagation Through Time trains the whole FGNN model.

5 EXPERIMENTS

Experiments show that FGNN and its BCS-based variants outperform baseline methods, while cross-session graph design and Mask-Readout improve session representations. Performance depends on neighborhood size, session length, graph layers, and embedding readout choices.

  • Overall comparison: FGNN outperforms all baseline methods on R@20 and MRR@20 across the three datasets.
  • Session graph generation: All BCS graph methods outperform FGNN-SG on both R@20 and MRR@20 across all datasets, showing the value of cross-session information.
  • Session length: FGNN-BCS-2 performs best for short sessions, whereas FGNN-BCS-3 performs best for long sessions.
  • Neighborhood sampling: Sampling more than three neighborhood hops can reduce performance because larger graphs add noise that shallow GNNs cannot adequately model.
  • Graph encoding: WGAT performs better than GCN and GAT because it captures edge direction and explicit edge weights, while three WGAT layers with eight heads perform best.
  • Graph embedding: The proposed Readout outperforms alternative graph-level embedding methods by learning an order based on item dependency relationships.
  • Mask-Readout: Mask-Readout outperforms Readout on BCS graphs by emphasizing items from the individual session and balancing them with cross-session information.

6 CONCLUSION

The paper addresses complicated item dependencies and missing cross-session information in anonymous session-based recommendation. It combines graph-based session modeling with cross-session connections, and reports superiority over state-of-the-art techniques on two large-scale benchmark datasets.

  • FGNN represents each session as a graph to learn complicated item dependency through graph convolution.The paper argues that sequences or random item sets are insufficient to capture item relations.
  • A BCS graph connects different sessions to incorporate cross-session information into anonymous-session recommendation.This addresses the data sparsity issue associated with anonymous sessions.
  • Mask-Readout generates more expressive session embeddings using information from the BCS graph.
  • Experiments on two large-scale benchmark datasets validate the solution's superiority over state-of-the-art techniques.
Loading 2107.00852v2…