
In many applications of session-based recommendation, social networks are usually available.
Since users' interests are influenced by their friends, recommender systems can leverage the social networks to better understand their users' preferences and thus provide more accurate recommendations.
However, existing methods for session-based social recommendation are not efficient.
To predict the next item of a user's ongoing session, the methods need to process many additional sessions that are generated by the user's friends to capture social influences, while non-social-aware methods (i.e., those without using social networks) only need to process one single session.
To solve the efficiency issue, we propose an efficient framework for session-based social recommendation.
In the framework, first, a heterogeneous graph neural network is used to learn user and item representations that integrate the knowledge from social networks.
Then, to predict the next item of an ongoing session, only the user and item representations relevant to the session are passed to a non-social-aware model.
During inference, since the user and item representations can be precomputed, the overall model runs as fast as the original non-social-aware model, while it can achieve better performance by leveraging the knowledge from social networks.
Apart from being efficient, our framework has two additional advantages.
First, the framework is flexible because any existing non-social-aware model can be plugged into the framework and the knowledge other than social networks can be easily integrated.
Second, our framework can capture cross-session item transitions while existing methods can only capture intra-session item transitions.
Extensive experiments conducted on three public datasets demonstrate the effectiveness and the efficiency of the proposed framework.