# Self-Supervised Graph Co-Training for Session-based Recommendation

Xin Xia  The University of Queensland<EMAIL_ADDRESS>,  Hongzhi Yin  The
University of Queensland<EMAIL_ADDRESS>,  Junliang Yu  The University of
Queensland<EMAIL_ADDRESS>,  Yingxia Shao  BUPT<EMAIL_ADDRESS>and
Lizhen Cui  Shandong University<EMAIL_ADDRESS>
(2021)

###### Abstract.

Session-based recommendation targets next-item prediction by exploiting user
behaviors within a short time period. Compared with other recommendation
paradigms, session-based recommendation suffers more from the problem of data
sparsity due to the very limited short-term interactions. Self-supervised
learning, which can discover ground-truth samples from the raw data, holds
vast potentials to tackle this problem. However, existing self-supervised
recommendation models mainly rely on item/segment dropout to augment data,
which are not fit for session-based recommendation because the dropout leads
to sparser data, creating unserviceable self-supervision signals. In this
paper, for informative session-based data augmentation, we combine self-
supervised learning with co-training, and then develop a framework to enhance
session-based recommendation. Technically, we first exploit the session-based
graph to augment two views that exhibit the internal and external
connectivities of sessions, and then we build two distinct graph encoders over
the two views, which recursively leverage the different connectivity
information to generate ground-truth samples to supervise each other by
contrastive learning. In contrast to the dropout strategy, the proposed self-
supervised graph co-training preserves the complete session information and
fulfills genuine data augmentation. Extensive experiments on multiple
benchmark datasets show that, session-based recommendation can be remarkably
enhanced under the regime of self-supervised graph co-training, achieving the
state-of-the-art performance.

Self-Supervised Learning, Contrastive Learning, Session-based Recommendation,
Co-Training

††journalyear: 2021††copyright: acmlicensed††conference: Proceedings of the
30th ACM International Conference on Information and Knowledge Management;
November 1–5, 2021; Virtual Event, QLD, Australia††booktitle: Proceedings of
the 30th ACM International Conference on Information and Knowledge Management
(CIKM ’21), November 1–5, 2021, Virtual Event, QLD, Australia††price:
15.00††doi: 10.1145/3459637.3482388††isbn: 978-1-4503-8446-9/21/11††ccs:
Information systems Recommender systems††ccs: Theory of computation Semi-
supervised learning

##  1\. Introduction

Recommender systems (RS) now have been pervasive and become an indispensable
tool to facilitate online shopping and information delivery. Most traditional
recommendation approaches share a common assumption that user behaviors are
constantly recorded and available for access (Yu et al., 2018, 2020). However,
in some situations, recording long-term user profiles may be infeasible. For
example, guests who do not log in, or users who keep personal information
private do not have an accessible user profile. Session-based recommendation
emerges to tackle this challenge (Wang et al., 2019), aiming at predicting the
next item only with short-term user interaction data generated in a session.
Owing to its promising prospect, in the past few years, session-based
recommendation has received considerable attention, and a number of models
have been successively developed (Rendle et al., 2010; Shani et al., 2005; Liu
et al., 2018; Li et al., 2017).

Early effort in this field brought Markov Chain into session-based scenarios
to capture the temporal information (Rendle et al., 2010; Shani et al., 2005).
Afterwards, deep learning exhibited overwhelming advantage of modeling
sequential data(Zhang et al., 2018), and recurrent neural networks (RNNs)
became the dominant paradigm in this line of research (Hidasi et al., 2015;
Hidasi and Karatzoglou, 2018). Recently, graph neural networks (GNNs) (Wu et
al., 2020) have sparked heated discussions across multiple fields for its
unprecedented effectiveness in solving graph-based tasks. As session-based
data can also be modeled as sequence-like graphs, there also have been a
proliferation of GNNs-based session-based recommendation models (Wu et al.,
2019a; Qiu et al., 2019; Xia et al., 2020; Xu et al., 2019; Pan et al., 2020),
which outperform RNNs-based models and show decent improvements. Despite the
achievements, however, these approaches are still compromised by the same
issue - data sparsity. Due to the inaccessibility of the long-term user
behavior data, session-based recommenders can only leverage very limited user-
item interactions generated within a short session to refine the corresponding
user/session representations. In most cases, these data is too few to induce
an accurate user preference, leading to sub-optimal recommendation
performance.

Self-supervised learning (SSL) (Liu et al., 2020), as an emerging learning
paradigm which can discover ground-truth samples from the raw data, is
considered to be an antidote to the data sparsity issue. Inspired by its great
success in the areas of graph and visual representation learning (Jin et al.,
2020; He et al., 2020), recent advances seek to harness SSL for improving
recommendation (Yu et al., 2021b; Xia et al., 2020; Zhou et al., 2020; Xie et
al., 2020). The typical idea of applying SSL to recommendation is conducting
stochastic data augmentations by randomly dropping some items/segments from
the raw user-item interaction graph/sequence to create supervisory signals,
which is analogous to the strategy used in masked language models like BERT
(Devlin et al., 2018). Following this line of thought, Bert4Rec (Sun et al.,
2019b) drives a cloze objective for sequential recommendation by predicting
the random masked items in the sequence with their left and right contexts.
$S^{3}$-Rec (Zhou et al., 2020) designs four types of pretexts to derive
supervision signals from the segments, items and attributes of sequential data
and then utilizes mutual information maximization to refine item
representations. Similarly, CL4SRec (Xie et al., 2020) adopts item cropping,
masking and reordering to construct different data augmentations based on
sequences for contrastive learning. With such random dropout strategies, SSL
is compatible with sequential recommendation. However, when it comes to
session-based recommendation, the same idea may not be practicable. It should
be noted that, the user interaction data generated in a session is much less
than a long-term user profile in sequential recommenders. Accordingly,
conducting dropout on session-based data would create sparser sequences, which
could be unserviceable for improving recommendation performance. To address
this problem, in this paper, we propose a novel framework which combines SSL
with semi-supervised learning to create more informative self-supervision
signals to enhance session-based recommendation.

Co-training (Blum and Mitchell, 1998), as a classical semi-supervised learning
paradigm, exploits unlabeled data to improve classifiers. The basic idea of
co-training is to train two classifiers over two different data views, and
then predict pseudo-labels of unlabeled instances to supervise each other in
an iterative way. In our framework, we first exploit the session-item graph to
construct two views (item view and session view) that exhibit the internal and
external connections of sessions. Then two asymmetric graph encoders (i.e.
graph convolutional networks) are built over these two views and trained under
the scheme of co-training. One of them (main encoder) is for recommendation
and the other acts as the auxiliary encoder to boost the former. Specifically,
given a session, we regard the items as unlabeled data. In each time, one
encoder predicts its possible next items and delivers them to the other
encoder, respectively. By doing so, both encoders can acquire complementary
information from each other. And then a contrastive objective is optimized
towards refining the encoders and item representations. Meanwhile, to prevent
the mode collapse (i.e. two encoders become very similar and suggest the same
item), we exploit adversarial examples to encourage divergence between the two
views. As this co-training regime is built upon the graph views derived from
the same data source for data augmentation, and is with a contrastive
objective, we name it self-supervised graph co-training. By iterating this
process, the benefits can be two-fold: (1). with the co-training proceeding,
the generated item samples become more informative (a.k.a. hard examples),
which can bring more useful information to each encoder compared with the
dropout strategy that is only for self-discrimination; (2). the complete data
of a session is preserved and two different aspects of connectivity
information are exploited, generating more practicable self-supervision
signals. Finally, the main encoder is significantly improved for
recommendation.

Overall, the contributions of this paper are summarized as follows:

  * •

We propose a novel self-supervised framework for session-based recommendation
which can generate more informative and practicable self-supervision signals.

  * •

The proposed framework is model-agnostic. Ideally, the architectures of the
two used encoders can be diverse, which generalizes the framework to adapt to
more scenarios.

  * •

Extensive experiments show that the proposed framework has overwhelming
superiority over the state-of-the-art baselines and achieves statistically
significant improvements on benchmark datasets. We release the code at
https://github.com/xiaxin1998/COTREC.

The rest of this paper is organized as follows. Section 2 summarizes the
related work of session-based recommendation and self-supervised learning.
Section 3 presents the proposed framework. The experimental results are
reported in Section 4. Finally, Section 5 concludes this paper.

##  2\. Related Work

###  2.1. Session-based Recommendation

Early studies on session-based recommendation focused on exploiting temporal
information from session data with Markov chain (Shani et al., 2005; Rendle et
al., 2010; Zimdars et al., 2013; Yin and Cui, 2016). Zimdars et al. (Zimdars
et al., 2013) investigated the order of temporal data based on Markov chain
and used a probability decision-tree to model sequential patterns between
items. Shan et al. (Shani et al., 2005) developed a novel recommender system
based on an Markov Decision Process model with appropriate initialization and
generated recommendations based upon the transition probabilities between
items. With the boom of deep learning, recurrent neural networks (RNNs)
(Hochreiter and Schmidhuber, 1997) have been applied to session-based
recommendation models to capture sequential order between items and achieved
great success (Zhang et al., 2014a; Liu et al., 2016). Hidasi et al. (Hidasi
et al., 2015) was the first that applied RNNs to model the whole session and
introduced several modifications to vanilla RNNs such as a ranking loss
function and session-parallel mini-batch training to generate more accurate
recommendations. As a follow-up study (Tan et al., 2016), Tan et al. enhanced
RNNs by utilizing the technique of data augmentation and handling the temporal
shifts of session data. Besides, NARM (Li et al., 2017), a neural attentive
recommendation algorithm, employs a hybrid encoder with attention mechanism to
model the user’s sequential behavior and capture the user’s main purpose in
the current session. In (Liu et al., 2018), a short-term attention priority
model is developed to capture both local and global user interests with simple
multilayer perceptrons (MLPs) networks and attention mechanism.

Graph Neural Networks (GNNs) (Wu et al., 2020) are recently introduced to
session-based recommendation and exhibit great performance (Wu et al., 2019a;
Wang et al., 2020b; Qiu et al., 2019; Pan et al., 2020; Sun et al., 2020).
Unlike RNN-based approaches, graph structure is an essential factor in graph-
based methods, aiming to learn item transitions over session graphs. For
example, SR-GNN (Wu et al., 2019a) is the first to model session sequences in
session graphs and applies a gated GNN model to aggregate information between
items into session representations. MGNN-SPred (Wang et al., 2020b) builds a
multi-relational item graph based on all session clicks to learn global item
associations and uses a gated mechanism to adaptively predict the next item.
GC-SAN (Xu et al., 2019) dynamically constructs session-educed graphs and
employs self-attention networks on the graphs to capture item dependencies via
graph information aggregation. FGNN (Qiu et al., 2019) rethinks the sequence
order of items to exploit users’ intrinsic intents using GNNs. GCE-GNN (Wang
et al., 2020a) aggregates item information from both item-level and session-
level through graph convolution and self-attention mechanism. LESSR (Chen and
Wong, 2020) proposes an edge-order preserving aggregation scheme based on GRU
and a shortcut graph attention layer to address the lossy session encoding
problem and effectively capture long-range dependencies, respectively.
Although these graph-based methods outperform RNN-based methods, they all
suffer data sparsity problem due to the limited short-term profiles in
session-based scenarios.

###  2.2. Self-Supervised Learning in RS

Recently, self-supervised learning (SSL) (Hjelm et al., 2018), as a novel
machine learning paradigm which mines free labels from unlabeled data and
supervises models using the generated labels, is under the spotlight. The
information or intermediate representation learned from self-supervised
learning are expected to carry good semantic or structural meanings and can be
beneficial to a variety of downstream tasks. SSL was initially applied in the
fields of visual representation learning and language modeling (Bachman et
al., 2019; Devlin et al., 2018), where it augments the raw data through image
rotation/clipping and sentence masking. Recent advances of SSL start to focus
on graphs, and have received considerable attention (Velickovic et al., 2019;
Hu et al., 2019; Wu et al., 2021). DGI (Velickovic et al., 2019) maximizes
mutual information between the local patch and the global graph to refine node
representations, making them as the ground-truth of each other. In InfoGraph
(Sun et al., 2019a), graph-level representations encode different aspects of
data by encouraging agreement between the representations of substructures
with different scales (e.g., nodes, edges, triangles). Hassani et al. (Hassani
and Khasahmadi, 2020) contrasted multiple views of graphs and nodes to learn
their representations. Qiu (Qiu et al., 2020) et al. designed a self-
supervised graph neural network pre-training framework to capture the
structural representations of graphs by leveraging instance discrimination and
contrastive learning.

Inspired by the success of SSL in other areas, there are also some studies
that integrate self-supervised learning into sequential recommendation (Zhou
et al., 2020; Ma et al., 2020; Xin et al., 2020). Bert4Rec (Sun et al., 2019b)
transfers the cloze objective from language modeling to sequential
recommendation by predicting the random masked items in the sequence with the
surrounding contexts. $S^{3}$-Rec (Zhou et al., 2020) utilizes the intrinsic
data correlations among attribute, item, subsequence and sequence to generate
self-supervision signals and enhance the data representations via pre-
training. Xie et al. (Xie et al., 2020) proposed three data augmentation
strategies to construct self-supervision signals from the original user
behavior sequences, extracting more meaningful user patterns and encoding
effective user representation. Ma et al. (Ma et al., 2020) proposed a
sequence-to-sequence training strategy based on latent self-supervision and
disentanglement of user intention behind behavior sequences. Besides, SSL is
also applied to other recommendation paradigms such as general recommendation
(Yao et al., 2020) and social recommendation (Yu et al., 2021b, a). Although
these self-supervised methods have achieved decent improvements in
recommendation performance, they are not suitable for session-based
recommendation for the reason that the random dropout strategy used in these
models would lead to sparser session data and unserviceable self-supervision
signals. The most relevant work to ours is $S^{2}$-DHCN (Xia et al., 2020)
which conducts contrastive learning between representations learned over
different hypergraphs by employing self-discrimination without random dropout.
But it cannot learn invariant representations against the data variance for
its fixed ground-truths, leading to merely slight improvements. Besides, Yu et
al. (Yu et al., 2021a) recently proposed a self-supervised tri-training
framework that leverages different aspects of social information to generate
complementary self-supervision signals to boost recommendation. As the first
work to combine SSL with multi-view semi-supervised learning for
recommendation, it gives us clues about applying co-training to session-based
recommendation.

Figure 1. An overview of the proposed COTREC framework.

##  3\. Proposed Method

###  3.1. Preliminaries

####  3.1.1. Notations.

Let $H=\\{i_{1},i_{2},i_{3},...,i_{N}\\}$ denote the set of items, where $N$
is the number of items. Each session is represented as a sequence
$s=[i_{s,1},i_{s,2},i_{s,3},...,i_{s,m}]$ ordered by timestamps and
$i_{s,k}\in H\ (1\leq k\leq m)$ represents an interacted item of an anonymous
user within the session $s$. For learning presentations, we embed each item
$i\in I$ into the same space and let
$\mathbf{x}_{i}^{(l)}\in\mathbb{R}^{d^{(l)}}$ denote the representation of
item $i$ of dimension $d^{(l)}$ in the $l$-th layer of a deep neural network.
The representation of the whole item set is denoted as
$\mathbf{X}^{(l)}\in\mathbb{R}^{N\times d^{(l)}}$, and $\bm{X}^{(0)}$ is
randomly initialized with uniform distribution. Each session $s$ is
represented by a vector $\mathbf{s}$. The task of session-based recommendation
is to predict the next item, namely $i_{s,m+1}$, for any given session $s$.
Given $I$ and $s$, the output of session-based recommendation model is a
ranked list $y=[y_{1},y_{2},y_{3},...,y_{N}]$ where $y_{i}\ (1\leq i\leq N)$
is the corresponding predicted probability of item $i$. The top-K items
$(1\leq K\leq N)$ with highest probabilities in $y$ will be selected as the
recommendations.

####  3.1.2. Co-Training.

Co-Training is a classical semi-supervised learning paradigm to exploit
unlabeled data (Blum and Mitchell, 1998; Da Costa et al., 2018; Han et al.,
2020). Under this regime, two classifiers are separately trained on two views
and then exchange confident pseudo labels of unlabeled instances to construct
additional labeled training data for each other. Typically, the two views are
two disjoint sets of features and can provide complementary information to
each other. Blum et al. (Blum and Mitchell, 1998) first proved that co-
training can bring significant benefits when the two views are sufficient and
conditionally independent. However, the required conditional dependence of two
views is hard to be satisfied in many cases. To relax this assumption, Abney
et al. (Abney, 2002) found that weak dependence can also enable co-training
success, which lifts the dependence restriction and makes co-training easily
applied. Furthermore, co-training can also be applied when there is only
single data representation if the data is processed by independent prediction
models, such as two different classifiers (Xu et al., 2013). It should be
mentioned that there have been several attempts that combine co-training and
recommendation (Zhang et al., 2014b; Da Costa et al., 2018). However, these
methods are all based on shallow or KNN-based models, leaving much space to be
explored by the graph neural models coupled with SSL.

###  3.2. Self-Supervised Graph Co-Training

In this section, the proposed self-supervised graph CO-Training framework for
session-based RECommendation (COTREC) is presented. The overview of COTREC is
illustrated in Figure 1.

####  3.2.1. View Augmentation.

To conduct co-training, we first derive two different views from the session
data, i.e. item view and session view, by exploiting the intra- and inter-
connectivity patterns of sessions. The item-view captures the item-level
connectivity information while the session view encodes the session-level
structural patterns. Concretely, the item view is educed by aligning all
sessions. In other words, any two items ($i_{a}$ and $i_{b}$) which are
connected in a session also get connected as nodes in the item view with a
weighted directed edge $E_{ab}$, counting how many times they are adjacent in
different sessions in the form of [$i_{a},i_{b}$]. As for the session view,
two sessions ($s_{j}$ and $s_{k}$) are connected as nodes with a weighted
undirected edge $E_{jk}$ obtained by using the number of shared items to
divide the number of total items in the two sessions (shown in the left part
of Figure 1). These two views are able to provide complementary information
for each other while keeping independent and exhibiting divergence to some
degree, which are subject to the weak dependence constraint in (Abney, 2002).
To make an analogy, if we intuitively consider the session data presented in
the left side of Fig.1 as the complete information, which is analogous to the
whole picture in the task of image recognition, then constructing these two
views corresponds to the patch clipping in visual self-supervised learning
(Chen et al., 2020). The augmented parts differ but inherit essential
information from the original data, which can help learn more generalizable
representations through a self-supervised task.

####  3.2.2. Learning Graph Encoders over Augmented Views.

After the view construction, we have two types of graphs. Although we aim to
devise a model-agnostic framework that can drive a multitude of session-based
neural graph recommendation models, for a concrete architecture than can
fulfill the capability of the proposed self-supervised graph co-training, we
construct two different graph encoders with graph convolutions over the views
as the base. However, the technical details can be modified to adapt to more
scenarios.

Item View Encoding. The item encoder with a simplified graph convolution layer
for the item view is defined as:

(1)
$\mathbf{X}_{I}^{(l+1)}=\hat{\mathbf{D}}_{I}^{-1}\hat{\mathbf{A}}_{I}\mathbf{X}_{I}^{(l)}\mathbf{W}_{I}^{l},$

where $\hat{\mathbf{A}}_{I}=\mathbf{A}_{I}+\mathbf{I}$ and $\mathbf{I}$ is the
identity matrix,
$\hat{\mathbf{D}}_{I,p,p}=\sum_{q=1}^{m}\hat{\mathbf{A}}_{I,p,q}$ and
$\mathbf{A}_{I}$ are the degree matrix and the adjacency matrix,
$\mathbf{X}_{I}^{(l)}$ and $\mathbf{W}_{I}^{l}$ represent the $l$-th layer’s
item embeddings and parameter matrix of the item view, respectively. Here we
do not use the non-linear function since it has been proved redundant in
recommendation (Wu et al., 2019b; Yu et al., 2021b). After passing
$\mathbf{X}^{(0)}$ through $L$ graph convolution layers, we average the item
embeddings obtained from each layer to be the final learned item embeddings
$\mathbf{X}_{I}=\frac{1}{L+1}\sum_{l=0}^{L}\mathbf{X}^{(l)}_{I}$. Although the
graph convolution can perfectly capture item connections, it cannot encode the
order of items in a specific session. Following (Wang et al., 2020a), we
concatenate the reversed position embeddings with the learned item
representations by a learnable position matrix
$\mathbf{P}_{r}=\left[\mathbf{p_{1}},\mathbf{p_{2}},\mathbf{p_{3}},...,\mathbf{p_{m}}\right]$,
where $m$ is the length of the current session and
$\mathbf{p_{m}}\in\mathbb{R}^{d}$ represents the vector of position $m$. The
embedding of $t$-th item in session $s=[i_{s,1},i_{s,2},i_{s,3},...,i_{s,m}]$
is:

(2)
$\mathbf{x}^{t*}_{I}=\tanh\left(\mathbf{W}_{1}\left[\mathbf{x}_{I}^{t}\|\mathbf{p}_{m-t+1}\right]+\mathbf{b}\right),$

where $\mathbf{W}_{1}\in\mathbb{R}^{d\times 2d}$, and $b\in\mathbb{R}^{d}$ are
learnable parameters.

Session embeddings can be obtained by aggregating representations of items
contained in that session. A soft-attention mechanism is often used in
session-based recommendation methods where different items should have
different priorities when learning session embeddings. We follow the strategy
used in GCE-GNN (Wang et al., 2020a) to refine the embedding of session
$s=[i_{s,1},i_{s,2},i_{s,3},...,i_{s,m}]$:

(3)
$\displaystyle\alpha_{t}=\mathbf{f}^{\top}\sigma\left(\mathbf{W}_{2}\mathbf{x}_{s}+\mathbf{W}_{3}\mathbf{x}^{t*}_{I}+\mathbf{c}\right),\mathbf{\theta}_{I}=\sum_{t=1}^{m}\alpha_{t}\mathbf{x}^{t*}_{I}$

where $\mathbf{x}_{s}$ is the embedding of session $s$ and here it is obtained
by averaging the embeddings of items within the session $s$, i.e.
$\mathbf{x}_{s}=\frac{1}{m}\sum_{t=1}^{m}\mathbf{x}_{I}^{m}$. Session
representation $\mathbf{\theta}_{I}$ is represented by aggregating item
embeddings considering their corresponding importance.
$\mathbf{f},\mathbf{c}\in\mathbb{R}^{d}$,
$\mathbf{W}_{2}\in\mathbb{R}^{d\times d}$ and
$\mathbf{W}_{3}\in\mathbb{R}^{d\times d}$ are attention parameters used to
learn the item weight $\alpha_{t}$.

Session View Encoding. The session view depicts item and session relations
from the other perspective. Similarly, the session encoder conducts graph
convolution on the session graph. As there are no items involved in the
session graph, we first initialize the session embeddings
$\bm{\Theta}_{S}^{(0)}$ by averaging the corresponding embeddings of items of
each session in $\mathbf{X}^{(0)}$. And the graph convolution on session graph
is defined as followed:

(4)
$\mathbf{\Theta}_{S}^{(l+1)}=\hat{\mathbf{D}}_{S}^{-1}\hat{\mathbf{A}}_{S}\mathbf{\Theta}_{S}^{(l)}\mathbf{W}_{S}^{(l)},$

where $\hat{\mathbf{A}}_{S}=\mathbf{A}_{S}+\mathbf{I}$, $\mathbf{A}_{S}$ is
the adjacency matrix, and $\hat{\mathbf{D}}_{S}$ is the corresponding degree
matrix, $\mathbf{\Theta}_{S}^{(l)}$ and $\mathbf{W}_{S}^{(l)}$ represent the
$l$-th layer’s session embeddings and the parameter matrix, respectively.
Similarly, we pass initialized session embeddings into $L$ graph convolution
layers to learn session-level information. The final session representations
are obtained by averaging $L$ embeddings learned at different layers, which is
formulated as
$\mathbf{\Theta}_{S}=\frac{1}{L+1}\sum_{l=0}^{L}\mathbf{\Theta}^{(l)}_{S}$.

####  3.2.3. Mining Self-Supervision Signals with Graph Co-Training.

In this section, we show how graph co-training mines informative self-
supervision signals to enhance session-based recommendation.

Recall that, in the last two subsections, we build two graph encoders over two
different views that can provide complementary information to each other.
Therefore, it is natural to refine each encoder by exploiting the information
from the other view. This can be achieved by following the regime of co-
training. Given a session $p$ in the session view, we predict its positive and
negative next-item samples using its representation learned over the item
view:

(5) $\mathbf{y}_{I}^{p}=\text{Softmax}\left(score_{I}^{p}\right),\,\ \ \
score_{I}^{p}=\mathbf{X}_{I}\mathbf{\theta}_{I}^{p}$

where $\theta_{I}^{p}$ is the representation of session $p$ in the item view,
and $\mathbf{y}_{I}^{p}\in\mathbb{R}^{N}$ denotes the predicted probability of
each item being recommended to session $p$ in the item view. $\theta_{I}^{p}$
can be seen as a linear classifier, and $\mathbf{X}_{I}$ is seen as the
unlabeled sample set.

With the computed probabilities, we can select items with the top-K highest
confidence as the positive samples which act as the augmented ground-truths to
supervise the session encoder. Formally, the positive sample selection is as
follows:

(6) $c^{p^{+}}_{S}=\mathrm{top}\text{-}K\left(\mathbf{y}_{I}^{p}\right).$

As for the way to select negative samples, a straightforward idea is to take
the items with the lowest scores. However, such a way can only choose easy
samples which contribute little. Instead, we randomly select $K$ negative
samples from the items ranked in top 10% in $\mathbf{y}_{I}^{p}$ excluding the
positives to construct $c^{p^{-}}_{S}$. These items can be seen as hard
negatives which can contribute enough information, and meanwhile are less
likely to fall into the set of false negatives which would mislead the
learning. Analogously, we use the similar way to select informative samples
for the item encoder,

(7) $\mathbf{y}_{S}^{p}=\text{Softmax}\left(score_{S}^{p}\right),\,\ \ \
score_{S}^{p}=\mathbf{X}^{(0)}\mathbf{\theta}_{S}^{p}$

where the main difference is that when selecting the top-$k$ item samples,
$\bm{X}^{(0)}$ is used rather than $\bm{X}_{I}$ because the session encoder
does not output convolved item embeddings.

In each training batch, the positive and negative pseudo-labels for each
session in each view are iteratively reconstructed and then are delivered to
the other view as the possible next item for refining session and item
representations. The intuition behind this process is that, the item samples,
which receive high confidence to be the next-item in one view, should also be
valuable in the other view. Iterating this process is expected to generate
more informative examples (a.k.a. harder examples). In turn, the encoders
evolve under the supervision of informative examples as well, which will
recursively distill harder examples.

####  3.2.4. Contrastive Learning.

With the generated pseudo-labels, the self-supervised task used to refine
encoders can be conducted through a contrastive objective. In session-based
scenarios, we assume that the last clicked item in a session is the most
related to the next item. Therefore, we can maximize (minimize) the agreement
between the representations of the last-clicked item and the predicted items
samples, accompanied with the given session representation as the session
context. Formally, given a session $p$ and the predicted ground-truths, we
follow InfoNCE (Oord et al., 2018), which can maximize the lower bound of
mutual information between the item pairs, as our learning objective:

(8) $\begin{split}&\mathcal{L}_{ssl}=-\log\frac{\sum_{i\in
c^{p^{+}}_{I}}\psi\left(\mathbf{x}^{last}_{I},\bm{\theta}_{I}^{p},\mathbf{x}_{I}^{i}\right)}{\sum_{i\in
c^{p^{+}}_{I}}\psi\left(\mathbf{x}^{last}_{I},\bm{\theta}_{I}^{p},\mathbf{x}_{I}^{i}\right)+\sum_{j\in
c^{p^{-}}_{I}}\psi\left(\mathbf{x}^{last}_{I},\bm{\theta}_{I}^{p},\mathbf{x}_{I}^{j}\right)}\\\
&-\log\frac{\sum_{i\in
c^{p^{+}}_{S}}\psi\left(\mathbf{x}^{last}_{(0)},\bm{\theta}_{S}^{p},\mathbf{x}_{(0)}^{i}\right)}{\sum_{c\in
c^{p^{+}}_{S}}\psi\left(\mathbf{x}^{last}_{(0)},\bm{\theta}_{S}^{p},\mathbf{x}_{(0)}^{i}\right)+\sum_{j\in
c^{p^{-}}_{S}}\psi\left(\mathbf{x}^{last}_{(0)},\bm{\theta}_{S}^{p},\mathbf{x}_{(0)}^{j}\right)}\end{split}$

where $\mathbf{x}^{last}$ is the embedding of the last-clicked item of the
given session,
$\psi\left(\bm{x}_{1},\bm{x}_{2},\bm{x}_{3}\right)=\exp\left(f\left(\bm{x}_{1}+\bm{x}_{2},\bm{x}_{3}+\bm{x}_{2}\right)/\tau\right)$
where $\tau$ is the temperature to amplify the effect of discrimination (we
empirically use 0.2 in our experiments), and
$f(\cdot):\mathbb{R}^{d}\times\mathbb{R}^{d}\longmapsto\mathbb{R}$ is the
discriminator function that takes two vectors as the input and then scores the
agreement between them. We simply implement the discriminator by applying the
cosine operation. Through the contrastive learning between the positive and
negative pairs, the two views can exchange information and the last-clicked
item representation can learn to infer related items with a session context,
and thus item and session representations are refined.

In the vanilla co-training, the generated pseudo-labels are re-used in
subsequent training as training labels. However, that way will make our
framework less efficient because adding pseudo-labels will lead to adjacency
matrix reconstruction in each iteration. Also, it may misguide the training
from then on when the pseudo-labels introduce false information because the
added pseudo-labels would not be removed. Therefore, in our model, we decide
not to add pseudo-labels into training set in view of the above
considerations. Besides, compared with the dropout based SSL methods (Xie et
al., 2020; Zhou et al., 2020) which leverage the fragmentary sequences as
self-supervision signals, our idea has the advantage of preserving the
complete session information and fulfilling genuine label augmentation, and
hence it is more suitable for session-based scenarios.

####  3.2.5. Divergence Constraint in Co-Training.

In our framework, the two data views for co-training are derived from the same
data source by exploiting structural information in different aspects. On the
one hand, this augmentation does not require two sufficient and independent
data sources, which is the advantage. But on the other hand, it somehow might
lead to the mode collapse problem, i.e., two encoders become similar and
generated the same ground-truths when given the same session after a number of
learning iterations. Therefore, it is necessary to make the two encoders
differ to some degree. Following (Qiao et al., 2018), we impose the divergence
constraint on the self-supervised graph co-training regime by integrating
adversarial examples into the training.

Theoretically, the adversarial examples targeting one encoder (Goodfellow et
al., 2014) would mislead it to generate wrong predictions. However, if the two
encoders are trained to be resistant to the adversarial examples generated by
each other and still output the correct predictions, we can manage to achieve
the goal of keeping them different. We define the divergence constraint as
follows:

(9)
$\begin{split}\mathcal{L}_{\mathrm{diff}}=&KL\left(Prob_{I}(\mathbf{X}_{I}),Prob_{S}\left(\mathbf{X}_{I}+\Delta_{adv}^{I}\right)\right)\\\
&+KL\left(Prob_{S}(\mathbf{X}_{I}),Prob_{I}\left(\mathbf{X}_{I}+\Delta_{adv}^{S}\right)\right),\end{split}$

where $Prob_{I}(\cdot)$ and $Prob_{S}(\cdot)$ represent the probabilities of
each item to be recommended to a given session $p$, which are computed by two
encoders:
$Prob_{I}(\mathbf{X}_{I})=\text{Softmax}(\bm{X}_{I}\bm{\theta}_{I}^{p})$, and
$Prob_{S}(\mathbf{X}_{I})=\text{Softmax}(\bm{X}_{I}\bm{\theta}_{S}^{p})$,
$\Delta_{adv}^{I}$ and $\Delta_{adv}^{S}$ represent the adversarial
perturbations on the item embeddings with regard to $\bm{\theta}_{I}^{p}$ and
$\bm{\theta}_{S}^{p}$, respectively, and $KL(\cdot)$ denotes the KL
divergence. To make it clear,
$Prob_{S}\left(\mathbf{X}_{I}+\Delta_{adv}^{I}\right)$ is the probability
distribution produced by the session encoder when $\bm{X}_{I}$ is perturbed by
$\Delta_{adv}^{I}$. If the session encoder is immune to $\Delta_{adv}^{I}$
that is destructive to the item encoder, it will output a probability
distribution similar to $Prob_{I}(\mathbf{X}_{I})$ due to shared information,
resulting in a smaller loss of Eq. (9), otherwise not.

To create adversarial examples, we adopt the FGSM method proposed in
(Goodfellow et al., 2014), which adds adversarial perturbations on model
parameters through fast gradient computation. In our paper, we add adversarial
perturbations on item embeddings. The perturbations $\Delta$ are updated as:

(10) $\Delta_{adv}=\epsilon\frac{\Gamma}{\|\Gamma\|}\quad\text{ where
}\quad\Gamma=\frac{\partial
l_{adv}(\hat{y}\mid\mathbf{x}+\Delta)}{\partial\Delta}.$

$l_{adv}(\hat{y})$ is the loss of aversarial examples and $\epsilon$ is the
control parameter ($\epsilon$ is 0.5 on Diginetica and 0.2 on Tmall and
RetailRocket in our experiments).

####  3.2.6. Model Optimization.

Based on the learned representations, the score of each candidate item $i\in
I$ to be recommended for a session $s$ is computed by doing inner product:

(11) $\hat{\mathbf{z}}_{i}=\mathbf{\theta}_{I}^{s\top}\mathbf{x}_{i}.$

Since the item view can reflect the item connectivity in a finer-grained
granularity, we use the encoder over the item view as the main encoder to
predict the final candidate items for recommendation. After that, a softmax
function is applied:

(12) $\hat{\mathbf{y}}=\operatorname{softmax}(\hat{\mathbf{z}}).$

We then use cross entropy loss function to be the learning objective:

(13)
$\mathcal{L}_{r}=-\sum_{i=1}^{N}\mathbf{y}_{i}\log\left(\hat{\mathbf{y}}_{i}\right)+\left(1-\mathbf{y}_{i}\right)\log\left(1-\hat{\mathbf{y}}_{i}\right).$

$\mathbf{y}$ is the one-hot encoding vector of the ground truth. For
simplicity, we leave out the $L_{2}$ regularization terms. Finally, we unify
the recommendation task with the auxiliary SSL task. The total loss $L$ is
defined as:

(14)
$\mathcal{L}=\mathcal{L}_{r}+\beta\mathcal{L}_{ssl}+\alpha\mathcal{L}_{\mathrm{diff}},$

where $\alpha,\beta$ are hyperparameters to control the scale of the self-
supervised graph co-training and view difference constraint. It should be
noted that, we jointly optimize the three throughout the training. Finally,
the whole procedure of COTREC is summarized in Algorithm 1.

Input: Sessions $\mathbf{S}$, node embeddings $\bm{X}$ ;

Output: Recommendation lists

1 Construct item view and session view ;

2 for  _each iteration_ do

3 for  _each batch_ do

4 Learn item and session representations through Eq. (1) - (4) ;

5 for  _each session $s$_ do

6 Predict the probabilities of items being the positive examples in different
views and obtain positive and negative examples with Eq.(5) - Eq. (7);

7 Compute self-supervised learning loss of two views via Eq.(8);

8

9 end for

10 Add divergence constraint by following Eq. (9) - (10);

11 Jointly optimize the overall objective in Eq. (14);

12

13 end for

14

15 end for

Algorithm 1 The whole procedure of COTREC Dataset | Tmall | RetailRocket | Diginetica
---|---|---|---
training sessions | 351,268 | 433,643 | 719,470
test sessions | 25,898 | 15,132 | 60,858
# of items | 40,728 | 36,968 | 43,097
average lengths | 6.69 | 5.43 | 5.12
Table 1. Dataset Statistics Method | Tmall | RetailRocket | Diginetica
---|---|---|---
P@10 | M@10 | P@20 | M@20 | P@10 | M@10 | P@20 | M@20 | P@10 | M@10 | P@20 | M@20
FPMC | 13.10 | 7.12 | 16.06 | 7.32 | 25.99 | 13.38 | 32.37 | 13.82 | 15.43 | 6.20 | 26.53 | 6.95
GRU4REC | 9.47 | 5.78 | 10.93 | 5.89 | 38.35 | 23.27 | 44.01 | 23.67 | 17.93 | 7.33 | 29.45 | 8.33
NARM | 19.17 | 10.42 | 23.30 | 10.70 | 42.07 | 24.88 | 50.22 | 24.59 | 35.44 | 15.13 | 49.70 | 16.17
STAMP | 22.63 | 13.12 | 26.47 | 13.36 | 42.95 | 24.61 | 50.96 | 25.17 | 33.98 | 14.26 | 45.64 | 14.32
SR-GNN | 23.41 | 13.45 | 27.57 | 13.72 | 43.21 | 26.07 | 50.32 | 26.57 | 36.86 | 15.52 | 50.73 | 17.59
GCE-GNN | 28.01 | 15.08 | 33.42 | 15.42 | - | - | - | - | 41.16 | 18.15 | $\mathbf{54.22}$ | 19.04
$S^{2}$-DHCN | 26.22 | 14.60 | 31.42 | 15.05 | 46.15 | 26.85 | 53.66 | 27.30 | 39.87 | 17.53 | 53.18 | 18.44
COTREC | $\mathbf{30.62}$ | $\mathbf{17.65}$ | $\mathbf{36.35}$ | $\mathbf{18.04}$ | $\mathbf{48.61}$ | $\mathbf{29.46}$ | $\mathbf{56.17}$ | $\mathbf{29.97}$ | $\mathbf{41.88}$ | $\mathbf{18.16}$ | 54.18 | $\mathbf{19.07}$
Table 2. Performances of all comparison methods on three datasets.

##  4\. Experiments

###  4.1. Experimental Settings

####  4.1.1. Datasets.

We evaluate our model on three real-world benchmark datasets:
Tmall111https://tianchi.aliyun.com/dataset/dataDetail?dataId=42,
RetailRocket222https://www.kaggle.com/retailrocket/ecommerce-dataset and
Diginetica333http://cikm2016.cs.iupui.edu/cikm-cup/, which are often used in
session-based recommendation methods. Tmall dataset comes from IJCAI-15
competition, which contains anonymized user’s shopping logs on Tmall online
shopping platform. RetailRocket is a dataset on a Kaggle contest published by
an e-commerce company, which contains the user’s browsing activity within six
months. Diginetica dataset describes the music listening behavior of users,
and Diginetica comes from CIKM Cup 2016. For convenience of comparing, we
follow the experiment environment in (Wu et al., 2019a; Wang et al., 2020a).
Specifically, we filter out all sessions whose length is 1 and items appearing
less than 5 times. Latest data (such as, the data of last week) is set to be
test set and previous data is used as training set. Then, we augment and label
the training and test datasets by using a sequence splitting method, which
generates multiple labeled sequences with the corresponding labels
$([i_{s,1}],i_{s,2}),([i_{s,1},i_{s,2}],i_{s,3}),...,([i_{s,1},i_{s,2},...,i_{s,m-1}],i_{s,m})$
for every session $s=[i_{s,1},i_{s,2},i_{s,3},...,i_{s,m}]$. Note that the
label of each sequence is the last click item in it. The statistics of the
datasets are presented in Table 1.

####  4.1.2. Baseline Methods.

We compare COTREC with the following representative methods:

  * •

FPMC (Rendle et al., 2010) is a sequential method based on Markov Chain. In
order to adapt it to session-based recommendation, we do not consider the user
latent representations when computing recommendation scores.

  * •

GRU4REC (Hidasi et al., 2015) utilizes a session-parallel mini-batch training
process and adopts ranking-based loss functions to model user sequences.

  * •

NARM (Li et al., 2017): is a RNN-based state-of-the-art model which employs
attention mechanism to capture user’s main purpose and combines it with the
sequential behavior to generate the recommendations.

  * •

STAMP (Liu et al., 2018): adopts attention layers to replace all RNN encoders
in the previous work and employs the self-attention mechanism(Vaswani et al.,
2017) to enhance the session-based recommendation performance.

  * •

SR-GNN (Wu et al., 2019a): applies a gated graph convolutional layer to obtain
item embeddings and also employs a soft-attention mechanism to compute the
session embeddings.

  * •

GCE-GNN (Wang et al., 2020a): constructs two types of session-educed graphs to
capture local and global information in different levels.

  * •

$\mathbf{S^{2}}\textbf{-DHCN}$ (Xia et al., 2020): constructs two types of
hypergraphs to learn inter- and intra-session information and uses self-
supervised learning to enhance session-based recommendation.

####  4.1.3. Evaluation Metrics.

Following (Wu et al., 2019a; Wang et al., 2020a), we use P@K (Precision) and
MRR@K (Mean Reciprocal Rank) to evaluate the recommendation results where K is
10 or 20.

####  4.1.4. Hyper-parameters Settings.

Following previous works, we set the embedding size to 100, the batch size for
mini-batch to 100, and the $L_{2}$ regularization to $10^{-5}$. In our model,
all parameters are initialized with the Gaussian Distribution
$\mathcal{N}(\bm{0},\bm{0.1})$. We use Adam with the learning rate of 0.001 to
optimize our model. For the number of layers of graph convolution on the three
datasets, a three-layer setting achieves the best performance. For the
baseline models, we refer to their best parameter setups reported in the
original papers and directly report their results if available, since we use
the same datasets and evaluation settings.

###  4.2. Experimental Results

####  4.2.1. Overall Performance.

The experimental results of overall performance are reported in Table 2, where
we highlight the best results of each column in boldface. From the results, we
can draw some conclusions:

  * •

Recent methods that consider temporal information (such as, GRU4REC, NARM,
STAMP, SR-GNN) outperform traditional methods (FPMC) that do not,
demonstrating the importance of capturing sequential dependency between items
in session-based recommendation. Besides, among the methods based on RNNs-like
units (RNN, LSTM, GRU), NRAM and STAMP achieve better performance than
GRU4REC. This is because NRAM and STAMP not only utilize recurrent neural
networks to model sequential behavior, but also utilize an attention mechanism
to learn importance of each item when learning session representations.
GRU4REC which only uses GRU cannot handle the shift of user preference.

  * •

Graph-based baseline methods all outperform RNN-based methods, showing the
great capacity of graph neural networks in modeling session data. Among them,
GCE-GNN obtains higher accuracy than SR-GNN. This proves that capturing
different levels of information (inter- and intra-session information) helps
accurately predict user intent in session-based recommendation. $S^{2}$-DHCN
also utilize both inter- and intra-session information in hypergraph modeling
and achieves promising performance. However, compared to GCE-GNN, $S^{2}$-DHCN
has lower results on Tmall and Diginetica, showing that self-discrimination
based SSL method is not so successful in improving session-based
recommendation performance, which is in line with our motivation.

  * •

Our proposed COTREC almost outperforms all the baselines on all the datasets.
Particularly, it beats other models by a large margin on Tmall, showing the
effectiveness of the self-supervised grpah co-training when applied to real
e-commerce data. Compared with the other self-supervised model $S^{2}$-DHCN,
the advantage is also obvious. Considering that $S^{2}$-DHCN and COTREC both
have a two-branch architecture, we think that the improvements mainly derive
from the multi-instance contrastive learning in Eq. (8) while $S^{2}$-DHCN
only conducts self-discrimination contrastive learning. Compared with another
strong baseline GCE-GNN, COTREC is competitive in terms of both performance
and efficiency. Although GCE-GNN can achieve comparable results on Diginetica,
its more complex structure makes it suffer from the out-of-memory problem when
performing on RetailRocket on our RTX 2080 Ti GPU. Besides, its performance is
much lower than that of COTREC on Tmall.

####  4.2.2. Ablation Study.

In this section, to investigate the contribution of each component in our
model, we develop four variant versions of COTREC: COTREC-base, base-NP, base-
NA, COTREC-ND, and we compare the four variants with the complete COTREC model
on Tmall and Diginetica. In COTREC-base, we only use the item view to model
session data, removing the session view and the self-supervised graph co-
training. In base-NP, we remove the reversed position embeddings. base-NA
means that we remove the soft-attention mechanism and replace it with
averaging item representations as the representation of each session. In
COTREC-ND, we only use self-supervised co-training without the divergence
constraint. We show the results of these four variants in Figure 2.

From Figure 2, we can observe that each component consistently contributes on
both datasets. The self-supervised co-training improves the base model the
most, serving as the driving force of the performance improvement. When
removing the self-supervised co-training, we can observe a remarkable
performance drop on both the two metrics. Besides, the divergence constraint
is effective to prevent mode collapse in co-training process. Without this
module, the performance of COTREC is even worse than that of the base on
Diginetica. Note that on Tmall, base-NP outperforms COTREC-base, proving that
a strict temporal order of items may negatively influence the performance in
some cases, which is in line with the our previous observation in
$S^{2}$-DHCN. According to the results of base-NA, it is shown that learning
different item importance across sessions is better than directly averaging
representations of contained items for learning session representations in
session-based recommendation.

Figure 2. Ablation Study. Method | Tmall | Diginetica
---|---|---
P@20 | M@20 | P@20 | M@20
COTREC-base | 27.71 | 13.36 | 52.66 | 18.19
base-DHCN | 32.94 | 16.22 | 52.02 | 17.70
base-MASK | 32.54 | 16.37 | 51.61 | 17.64
COTREC | 36.35 | 18.04 | 54.18 | 19.07
Table 3. Comparisons of Different SSL Methods.

####  4.2.3. Comparison with Different SSL Methods.

To further investigate the effectiveness of the proposed self-supervised graph
co-training, we also compare it with other different SSL methods that are
based on self-discrimination and random dropout to generate self-supervision
signals on Tmall and Diginetica. The first is the method proposed in
$S^{2}$-DHCN. DHCN proposes to capture item-level and session-level
information and maximize mutual information between the session
representations learned at the two levels. Positive examples are two types of
session representation of the same session, whereas negative pairs are
representations of different sessions. The second compared SSL method is based
on the item mask, which is an often used strategy where some items are
randomly dropped in each session. The generated new session can be the
positive example and other sessions can be negative samples. For a fair
comparison, we employ these SSL strategies on the base model of COTREC. So we
name the three as base-COTREC, base-DHCN, base-MASK. Besides, these SSL
methods are used to establish auxiliary tasks in the model optimization and we
use a hyperparameter to control the magnitude of SSL. Finally, we use grid-
search to adjust the parameter to ensure the best performances of them, and
the best results are shown in Table 3.

From Table 3, we can see that, only the self-supervised graph co-training can
boost the recommendation performance on both datasets and it also achieves the
best performance, while the other two methods can only take effect on Tmall,
demonstrating that self-supervised graph co-training is more effective than
self-discrimination and dropout-based methods. We also find that the strategy
of item mask is the least effective in most cases, proving that masked sub-
sequences can only generate sub-optimal self-supervision signals in the
scenario of session-based recommendation due to the very limited behaviors.

Figure 3. P@20 results on Long and Short. Figure 4. Hyperparameter Analysis.
Figure 5. The impacts of the number of layer.

####  4.2.4. Handling Different Session Lengths.

In real world situations, sessions with various lengths are common, so it is
interesting to know how stable our COTREC as well as the baseline models are
when dealing with them, and it is also a critical indicator for production
environments. To evaluate this, we follow (Liu et al., 2018; Wu et al., 2019a)
to split the sessions of Tmall and Diginetica into two groups with different
lengths and name them as Short and Long. Short contains sessions whose lengths
are less than or equal to 5, while Long contains sessions whose lengths are
larger than 5. Then, we compare the performance of COTREC with some
representative baselines, i.e., STAMP, SR-GNN, GCE-GNN and $S^{2}$-DHCN in
terms of Prec@20 on Short and Long. Results in Figure 3 show that COTREC
almost outperforms all the baseline models on both datasets with different
session lengths. It demonstrates the adaptability of COTREC in real-world
session-based recommendation. Besides, it is shown that the performance on the
short sessions is better than that on the long sessions.

####  4.2.5. The Impact of Hyperparameters.

In COTREC, we have two hyperparameters to control the magnitude of the SSL
taks and the effect of the divergence constraint, i.e. $\beta$ and $\alpha$.
To investigate the influence of them, we report the performance with a set of
representative $\beta$ values in { 0.001, 0.005, 0.01, 0.05, 0.1, 0.2, 0.5, 1}
and $\alpha$ values in {0, 0.001, 0.005, 0.01, 0.05, 0.1, 0.2, 0.5} on Tmall
and Diginetica. We fix the other parameter as 0.005 when investigating $\beta$
or $\alpha$. According to the results in Figure 4, our model achieves the best
performance when jointly trained with the SSL taks and the divergence
constraint. On both Tmall and Diginetica, the best setting is $\beta=0.05$ and
$\alpha=0.005$. When using large $\alpha$, a huge performance drop is
observed, demonstrating that when there is large divergence between two
encoder, it is hard for them to supervise each other.

####  4.2.6. The impact of the number of layers.

To investigate the impact of the number of layers in graph convolution
network, we range the number of layers in {1, 2, 3, 4, 5}. According to the
results in Figure 5, we can see that for both Tmall and Diginetica, a three-
layer setting achieves the best performance. When the number becomes larger,
performance will drop due to the over-smoothing issue. Besides, an obvious
performance fluctuation is observed on Diginetica.

##  5\. Conclusion

Self-supervised learning is an emerging machine learning paradigm which
exploits unlabeled data by generating ground-truth labels from the raw data
itself and recently has been utilized in many fields to enhance deep learning
models. Existing SSL-based recommendation methods usually adopt random
dropout-based self-discrimination to generate self-supervision signals.
However, we argue that it cannot adapt to session-based recommendation because
it would create sparser data and cannot leverage informative self-supervision
signals from other entities. In this paper, we design a self-supervised graph
co-training framework to address this issue. In our framework, co-training can
iteratively selects evolving pseudo-labels as informative self-supervision
examples for each view to improve the session-based recommendation. Extensive
experiments and empirical studies demonstrate the effectiveness of our
framework and show its superiority over other recent baselines.

##  6\. Acknowledgment

This work was supported by ARC Discovery Project (Grant No. DP190101985),ARC
Future Fellowship (FT210100624), National Natural Science Foundation of China
(No. U1936104), CCF- Baidu Open Fund, and The Fundamental Research Funds for
the Central Universities 2020RC25.

## References

  * (1)
  * Abney (2002) Steven Abney. 2002\.  Bootstrapping. In _Proceedings of the 40th annual meeting of the Association for Computational Linguistics_. 360–367.
  * Bachman et al. (2019) Philip Bachman, R Devon Hjelm, and William Buchwalter. 2019\.  Learning representations by maximizing mutual information across views. In _Advances in Neural Information Processing Systems_. 15535–15545.
  * Blum and Mitchell (1998) Avrim Blum and Tom Mitchell. 1998.  Combining labeled and unlabeled data with co-training. In _Proceedings of the eleventh annual conference on Computational learning theory_. 92–100.
  * Chen et al. (2020) Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. 2020.  A simple framework for contrastive learning of visual representations. In _International conference on machine learning_. PMLR, 1597–1607.
  * Chen and Wong (2020) Tianwen Chen and Raymond Chi-Wing Wong. 2020.  Handling Information Loss of Graph Neural Networks for Session-based Recommendation. In _Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining_. 1172–1180.
  * Da Costa et al. (2018) Arthur F Da Costa, Marcelo G Manzato, and Ricardo JGB Campello. 2018.  CoRec: a co-training approach for recommender systems. In _Proceedings of the 33rd Annual ACM Symposium on Applied Computing_. 696–703.
  * Devlin et al. (2018) Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018.  Bert: Pre-training of deep bidirectional transformers for language understanding.  _arXiv preprint arXiv:1810.04805_ (2018).
  * Goodfellow et al. (2014) Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. 2014\.  Explaining and harnessing adversarial examples.  _arXiv preprint arXiv:1412.6572_ (2014).
  * Han et al. (2020) Tengda Han, Weidi Xie, and Andrew Zisserman. 2020.  Self-supervised co-training for video representation learning.  _arXiv preprint arXiv:2010.09709_ (2020).
  * Hassani and Khasahmadi (2020) Kaveh Hassani and Amir Hosein Khasahmadi. 2020.  Contrastive Multi-View Representation Learning on Graphs.  _arXiv preprint arXiv:2006.05582_ (2020).
  * He et al. (2020) Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. 2020.  Momentum contrast for unsupervised visual representation learning. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_. 9729–9738.
  * Hidasi and Karatzoglou (2018) Balázs Hidasi and Alexandros Karatzoglou. 2018.  Recurrent neural networks with top-k gains for session-based recommendations. In _Proceedings of the 27th ACM International Conference on Information and Knowledge Management_. 843–852.
  * Hidasi et al. (2015) Balázs Hidasi, Alexandros Karatzoglou, Linas Baltrunas, and Domonkos Tikk. 2015.  Session-based recommendations with recurrent neural networks.  _arXiv preprint arXiv:1511.06939_ (2015).
  * Hjelm et al. (2018) R Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Phil Bachman, Adam Trischler, and Yoshua Bengio. 2018.  Learning deep representations by mutual information estimation and maximization.  _arXiv preprint arXiv:1808.06670_ (2018).
  * Hochreiter and Schmidhuber (1997) Sepp Hochreiter and Jürgen Schmidhuber. 1997.  Long short-term memory.  _Neural computation_ 9, 8 (1997), 1735–1780.
  * Hu et al. (2019) Weihua Hu, Bowen Liu, Joseph Gomes, Marinka Zitnik, Percy Liang, Vijay Pande, and Jure Leskovec. 2019.  Strategies for pre-training graph neural networks.  _arXiv preprint arXiv:1905.12265_ (2019).
  * Jin et al. (2020) Wei Jin, Tyler Derr, Haochen Liu, Yiqi Wang, Suhang Wang, Zitao Liu, and Jiliang Tang. 2020.  Self-supervised learning on graphs: Deep insights and new direction.  _arXiv preprint arXiv:2006.10141_ (2020).
  * Li et al. (2017) Jing Li, Pengjie Ren, Zhumin Chen, Zhaochun Ren, Tao Lian, and Jun Ma. 2017\.  Neural attentive session-based recommendation. In _Proceedings of the 2017 ACM on Conference on Information and Knowledge Management_. 1419–1428.
  * Liu et al. (2016) Qiang Liu, Shu Wu, Liang Wang, and Tieniu Tan. 2016\.  Predicting the next location: A recurrent model with spatial and temporal contexts. In _Thirtieth AAAI conference on artificial intelligence_.
  * Liu et al. (2018) Qiao Liu, Yifu Zeng, Refuoe Mokhosi, and Haibin Zhang. 2018\.  STAMP: short-term attention/memory priority model for session-based recommendation. In _Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining_. 1831–1839.
  * Liu et al. (2020) Xiao Liu, Fanjin Zhang, Zhenyu Hou, Zhaoyu Wang, Li Mian, Jing Zhang, and Jie Tang. 2020.  Self-supervised learning: Generative or contrastive.  _arXiv preprint arXiv:2006.08218_ 1, 2 (2020).
  * Ma et al. (2020) Jianxin Ma, Chang Zhou, Hongxia Yang, Peng Cui, Xin Wang, and Wenwu Zhu. 2020\.  Disentangled Self-Supervision in Sequential Recommenders. In _Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining_. 483–491.
  * Oord et al. (2018) Aaron van den Oord, Yazhe Li, and Oriol Vinyals. 2018.  Representation learning with contrastive predictive coding.  _arXiv preprint arXiv:1807.03748_ (2018).
  * Pan et al. (2020) Zhiqiang Pan, Fei Cai, Wanyu Chen, Honghui Chen, and Maarten de Rijke. 2020.  Star Graph Neural Networks for Session-based Recommendation. In _Proceedings of the 29th ACM International Conference on Information & Knowledge Management_. 1195–1204.
  * Qiao et al. (2018) Siyuan Qiao, Wei Shen, Zhishuai Zhang, Bo Wang, and Alan Yuille. 2018.  Deep co-training for semi-supervised image recognition. In _Proceedings of the european conference on computer vision (eccv)_. 135–152.
  * Qiu et al. (2020) Jiezhong Qiu, Qibin Chen, Yuxiao Dong, Jing Zhang, Hongxia Yang, Ming Ding, Kuansan Wang, and Jie Tang. 2020\.  GCC: Graph Contrastive Coding for Graph Neural Network Pre-Training. In _Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining_. 1150–1160.
  * Qiu et al. (2019) Ruihong Qiu, Jingjing Li, Zi Huang, and Hongzhi Yin. 2019\.  Rethinking the Item Order in Session-based Recommendation with Graph Neural Networks. In _Proceedings of the 28th ACM International Conference on Information and Knowledge Management_. 579–588.
  * Rendle et al. (2010) Steffen Rendle, Christoph Freudenthaler, and Lars Schmidt-Thieme. 2010\.  Factorizing personalized markov chains for next-basket recommendation. In _Proceedings of the 19th international conference on World wide web_. 811–820.
  * Shani et al. (2005) Guy Shani, David Heckerman, and Ronen I Brafman. 2005\.  An MDP-based recommender system.  _Journal of Machine Learning Research_ 6, Sep (2005), 1265–1295.
  * Sun et al. (2019b) Fei Sun, Jun Liu, Jian Wu, Changhua Pei, Xiao Lin, Wenwu Ou, and Peng Jiang. 2019b.  BERT4Rec: Sequential recommendation with bidirectional encoder representations from transformer. In _Proceedings of the 28th ACM international conference on information and knowledge management_. 1441–1450.
  * Sun et al. (2019a) Fan-Yun Sun, Jordan Hoffmann, Vikas Verma, and Jian Tang. 2019a.  Infograph: Unsupervised and semi-supervised graph-level representation learning via mutual information maximization.  _arXiv preprint arXiv:1908.01000_ (2019).
  * Sun et al. (2020) Ke Sun, Tieyun Qian, Tong Chen, Yile Liang, Quoc Viet Hung Nguyen, and Hongzhi Yin. 2020.  Where to go next: Modeling long-and short-term user preferences for point-of-interest recommendation. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , Vol. 34. 214–221.
  * Tan et al. (2016) Yong Kiam Tan, Xinxing Xu, and Yong Liu. 2016.  Improved recurrent neural networks for session-based recommendations. In _Proceedings of the 1st Workshop on Deep Learning for Recommender Systems_. 17–22.
  * Vaswani et al. (2017) Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017.  Attention is All You Need. In _Advances in neural information processing systems_. 5998–6008.
  * Velickovic et al. (2019) Petar Velickovic, William Fedus, William L Hamilton, Pietro Liò, Yoshua Bengio, and R Devon Hjelm. 2019.  Deep Graph Infomax.. In _ICLR (Poster)_.
  * Wang et al. (2019) Shoujin Wang, Longbing Cao, and Yan Wang. 2019.  A survey on session-based recommender systems.  _arXiv preprint arXiv:1902.04864_ (2019).
  * Wang et al. (2020b) Wen Wang, Wei Zhang, Shukai Liu, Qi Liu, Bo Zhang, Leyu Lin, and Hongyuan Zha. 2020b.  Beyond clicks: Modeling multi-relational item graph for session-based target behavior prediction. In _Proceedings of The Web Conference 2020_. 3056–3062.
  * Wang et al. (2020a) Ziyang Wang, Wei Wei, Gao Cong, Xiao-Li Li, Xian-Ling Mao, and Minghui Qiu. 2020a.  Global context enhanced graph neural networks for session-based recommendation. In _Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval_. 169–178.
  * Wu et al. (2019b) Felix Wu, Tianyi Zhang, Amauri Holanda de Souza Jr, Christopher Fifty, Tao Yu, and Kilian Q Weinberger. 2019b.  Simplifying graph convolutional networks.  _arXiv preprint arXiv:1902.07153_ (2019).
  * Wu et al. (2021) Lirong Wu, Haitao Lin, Zhangyang Gao, Cheng Tan, Stan Li, et al. 2021\.  Self-supervised on Graphs: Contrastive, Generative, or Predictive.  _arXiv preprint arXiv:2105.07342_ (2021).
  * Wu et al. (2019a) Shu Wu, Yuyuan Tang, Yanqiao Zhu, Liang Wang, Xing Xie, and Tieniu Tan. 2019a.  Session-based recommendation with graph neural networks. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , Vol. 33. 346–353.
  * Wu et al. (2020) Zonghan Wu, Shirui Pan, Fengwen Chen, Guodong Long, Chengqi Zhang, and S Yu Philip. 2020\.  A comprehensive survey on graph neural networks.  _IEEE Transactions on Neural Networks and Learning Systems_ (2020).
  * Xia et al. (2020) Xin Xia, Hongzhi Yin, Junliang Yu, Qinyong Wang, Lizhen Cui, and Xiangliang Zhang. 2020\.  Self-Supervised Hypergraph Convolutional Networks for Session-based Recommendation.  _arXiv preprint arXiv:2012.06852_ (2020).
  * Xie et al. (2020) Xu Xie, Fei Sun, Zhaoyang Liu, Jinyang Gao, Bolin Ding, and Bin Cui. 2020\.  Contrastive Pre-training for Sequential Recommendation.  _arXiv preprint arXiv:2010.14395_ (2020).
  * Xin et al. (2020) Xin Xin, Alexandros Karatzoglou, Ioannis Arapakis, and Joemon M Jose. 2020.  Self-Supervised Reinforcement Learning forRecommender Systems.  _arXiv preprint arXiv:2006.05779_ (2020).
  * Xu et al. (2013) Chang Xu, Dacheng Tao, and Chao Xu. 2013.  A survey on multi-view learning.  _arXiv preprint arXiv:1304.5634_ (2013).
  * Xu et al. (2019) Chengfeng Xu, Pengpeng Zhao, Yanchi Liu, Victor S Sheng, Jiajie Xu, Fuzhen Zhuang, Junhua Fang, and Xiaofang Zhou. 2019\.  Graph contextualized self-attention network for session-based recommendation. In _Proc. 28th Int. Joint Conf. Artif. Intell.(IJCAI)_. 3940–3946.
  * Yao et al. (2020) Tiansheng Yao, Xinyang Yi, Derek Zhiyuan Cheng, Felix Yu, Ting Chen, Aditya Menon, Lichan Hong, Ed H Chi, Steve Tjoa, Jieqi Kang, et al. 2020\.  Self-supervised learning for deep models in recommendations.  _arXiv e-prints_ (2020), arXiv–2007.
  * Yin and Cui (2016) Hongzhi Yin and Bin Cui. 2016.  _Spatio-temporal recommendation in social media_.  Springer.
  * Yu et al. (2018) Junliang Yu, Min Gao, Jundong Li, Hongzhi Yin, and Huan Liu. 2018.  Adaptive implicit friends identification over heterogeneous network for social recommendation. In _Proceedings of the 27th ACM international conference on information and knowledge management_. 357–366.
  * Yu et al. (2021a) Junliang Yu, Hongzhi Yin, Min Gao, Xin Xia, Xiangliang Zhang, and Nguyen Quoc Viet Hung. 2021a.  Socially-Aware Self-Supervised Tri-Training for Recommendation.  _arXiv preprint arXiv:2106.03569_ (2021).
  * Yu et al. (2020) Junliang Yu, Hongzhi Yin, Jundong Li, Min Gao, Zi Huang, and Lizhen Cui. 2020.  Enhance Social Recommendation with Adversarial Graph Convolutional Networks.  _arXiv preprint arXiv:2004.02340_ (2020).
  * Yu et al. (2021b) Junliang Yu, Hongzhi Yin, Jundong Li, Qinyong Wang, Nguyen Quoc Viet Hung, and Xiangliang Zhang. 2021b.  Self-Supervised Multi-Channel Hypergraph Convolutional Network for Social Recommendation. In _Proceedings of the Web Conference 2021_. 413–424.
  * Zhang et al. (2014b) Mi Zhang, Jie Tang, Xuchen Zhang, and Xiangyang Xue. 2014b.  Addressing cold start in recommender systems: A semi-supervised co-training algorithm. In _Proceedings of the 37th international ACM SIGIR conference on Research & development in information retrieval_. 73–82.
  * Zhang et al. (2014a) Yuyu Zhang, Hanjun Dai, Chang Xu, Jun Feng, Taifeng Wang, Jiang Bian, Bin Wang, and Tie-Yan Liu. 2014a.  Sequential click prediction for sponsored search with recurrent neural networks. In _Twenty-Eighth AAAI Conference on Artificial Intelligence_.
  * Zhang et al. (2018) Yan Zhang, Hongzhi Yin, Zi Huang, Xingzhong Du, Guowu Yang, and Defu Lian. 2018\.  Discrete deep learning for fast content-aware recommendation. In _Proceedings of the eleventh ACM international conference on web search and data mining_. 717–726.
  * Zhou et al. (2020) Kun Zhou, Hui Wang, Wayne Xin Zhao, Yutao Zhu, Sirui Wang, Fuzheng Zhang, Zhongyuan Wang, and Ji-Rong Wen. 2020\.  S^ 3-Rec: Self-Supervised Learning for Sequential Recommendation with Mutual Information Maximization.  _arXiv preprint arXiv:2008.07873_ (2020).
  * Zimdars et al. (2013) Andrew Zimdars, David Maxwell Chickering, and Christopher Meek. 2013.  Using temporal data for making recommendations.  _arXiv preprint arXiv:1301.2320_ (2013).