Paper commentary
Self-supervised Graph Learning for Recommendation
Self-supervised graph learning makes recommendation more accurate on long-tail items and robust to noise
- Problem Graph convolution recommenders learn from sparse, skewed and noisy user-item edges. High-degree items dominate the learned representations, so long-tail items are poorly recommended.
- Method SGL adds a contrastive self-supervised loss to the LightGCN recommendation loss. It builds two perturbed views of the user-item graph by node dropout, edge dropout or random walk, and pulls the two views of the same node together.
- Results SGL-ED reaches Recall@20 of 0.0675 on Yelp2018, against 0.0639 for LightGCN. It is the top method in the overall comparison on all three datasets.
Where GCN recommenders struggle
Graph convolution recommenders learn user and item vectors by pulling information from multi-hop neighbours on the user-item graph, which lets them exploit connectivity beyond direct interactions. The study's starting point is that this family has three weaknesses: the supervision signal is sparse, the degree distribution is skewed, and the observed interactions are noisy.
The skew matters because high-degree items appear more often both in neighbourhood aggregation and in the supervised loss, so they dominate the learned representations. Low-degree items, which have little supervision, are therefore pulled towards the popular ones and end up poorly represented.
Interaction noise compounds the problem, since implicit feedback such as a click can be a mistake that the user later regrets, and the aggregation step then spreads that edge to neighbouring nodes.
Building two graph views
Image and text augmentations such as cropping or blurring do not transfer to a user-item graph, because the features are discrete IDs and users and items depend on one another. SGL therefore changes the graph structure itself, and the authors treat the adjacency matrix as the input whose perturbations produce the auxiliary signal.
Two stochastic selections are applied to the same graph and each feeds a separate propagation pass, so the two views Z1 and Z2 share the same layer-wise aggregation rule but see different subgraphs. Node dropout removes each node with probability \( \rho \) together with its edges, using masks over the node set, while edge dropout masks the edge set itself.
Random walk keeps the same edge-dropout masks but draws a separate mask for each GCN layer, so the structure changes from layer to layer rather than being fixed across them.
Views are regenerated at the start of each epoch, and the two views of a layer use the same dropout and masking ratios. Because the operations are only dropout and masking, the augmentations add no trainable parameters to the model.
Contrastive objective and joint training
The two views of the same user form a positive pair, and the views of every other user form negative pairs. The contrastive term is an InfoNCE loss on cosine similarity with temperature \( \tau \), summed over users, and an analogous term is computed on the item side and added to it.
The total objective adds this self-supervised loss to the BPR loss with weight \( \lambda_1 \) and applies \( L_2 \) regularisation with weight \( \lambda_2 \). The authors also test a sequential alternative in which the self-supervised loss is pre-trained first and the BPR loss is used afterwards for fine-tuning.
Why the temperature controls hard negatives
Differentiating the loss with respect to a user's view gives a gradient with a positive-node term and a sum of terms over the negatives, weighted by their softmax probabilities. Writing \( x \) for the cosine similarity between a positive and a negative node, the magnitude of a negative's contribution is proportional to \( g(x)=\sqrt{1-x^{2}}\exp(x/\tau) \).
Negatives with \( 0<x\le 1 \) are called hard, since they are close to the positive, and those with \( -1\le x<0 \) are easy. With \( \tau=0.1 \) the value of \( g(x) \) at hard negatives reaches about 4,000, while easy negatives contribute almost nothing.
Maximising \( g(x) \) gives the optimal similarity \( x^{*}=(\sqrt{\tau^{2}+4}-\tau)/2 \), and as \( \tau \) decreases \( x^{*} \) approaches 0.9 while the peak weight grows to close to \( e^{8} \). The authors conclude that a suitable \( \tau \) lets SGL carry out hard negative mining automatically, and they position this against an earlier analysis that treats hard negatives as near-zero similarity and leaves the region \( x>0 \) unexamined.
Cost of the added task
Space complexity and inference time are unchanged relative to LightGCN, because the model structure does not change and no parameters are added. The training cost grows with the sparse adjacency work for two sub-graphs per epoch and with the InfoNCE term, which scales with the number of users when every other user is a negative.
Using only the in-batch users or items as negatives replaces the dependence on the full node count with one on the batch size. For Yelp2018 with keep probability 0.8, the analytical time complexity of SGL-ED in its alternative form is about 3.7x that of LightGCN.
Datasets, protocol and settings
Experiments use Yelp2018 and Amazon-Book with the 10-core setting, and Alibaba-iFashion, which is sparser and is reduced by sampling 300k users and keeping all their interactions over fashion outfits. Yelp2018 has 31,668 users, 38,048 items, 1,561,406 interactions and a density of 0.00130.
Interactions are split into training, validation and testing sets at 7:1:2, and top-K results are reported as Recall@20 and NDCG@20 under the all-ranking protocol. All models are trained from scratch with Xavier initialisation and the Adam optimiser at learning rate 0.001 and batch size 2048. The SGL-specific values \( \lambda_1 \), \( \tau \) and \( \rho \) were tuned over the ranges listed in the hyper-parameter settings, and shared hyper-parameters were inherited from the baselines.
Gains over LightGCN across depths
Across the three depths, the authors report that the SGL variants beat LightGCN by a large margin in most cases.
SGL-ED is best in 10 of 18 cases across the three layer settings and three datasets, while SGL-RW beats SGL-ND on all three datasets. The authors attribute the edge-dropout advantage to its ability to capture patterns in the graph structure, and they note that edge dropout is better on the denser datasets whereas random walk is slightly better on Alibaba-iFashion.
Node dropout behaves less steadily than edge dropout and random walk on Yelp2018 and Amazon-Book, which the authors explain by its removal of high-degree nodes changing the graph strongly. Gains on Amazon-Book and Alibaba-iFashion are larger than on Yelp2018, and the authors link this to the sparser supervision on those two datasets. Going from one layer to three improves SGL, and the authors read this as contrastive learning easing over-smoothing and overfitting.
Comparison with other baselines
In the overall comparison SGL-ED has Recall 0.0675 and NDCG 0.0555 on Yelp2018, against 0.0639 and 0.0525 for LightGCN and 0.0483 and 0.0382 for DNN+SSL. The paper's %Improv. row reports 5.63% on Yelp2018 Recall and 12.46% on Amazon-Book NDCG, and the largest Amazon-Book gain is in NDCG.
On Amazon-Book, DNN+SSL is the strongest baseline with Recall 0.0438, while SGL-ED reaches 0.0478 on the same metric. DNN+SSL performs much worse on the other datasets, which the authors connect to applying SSL directly to ID embeddings rather than to graph representations. The reported p-values are below 0.05 in all six Recall and NDCG cases, and the authors call the improvements of SGL-ED over the strongest baseline statistically significant in each case.
Long-tail items
Items are divided into ten popularity groups with equal numbers of interactions, and total Recall@20 is decomposed into per-group contributions, with the largest group index corresponding to the most popular items. For LightGCN, the 10th group holds only 0.83%, 0.83% and 0.22% of the item space on the three datasets but contributes 39.72%, 39.92% and 51.92% of total Recall.
For SGL-ED the 10th group's contribution falls to 36.27%, 29.15% and 35.07% on the three datasets. The authors read the gains as coming mainly from accurately recommending items with sparse interactions, which they say indicates better representations for those items.
Convergence speed
SGL-ED reaches its best performance at epoch 18 on Yelp2018 and epoch 16 on Amazon-Book, whereas LightGCN needs 720 and 700 epochs on those datasets. The authors credit two factors: the InfoNCE objective contrasts each node against many negatives, while the BPR loss in LightGCN uses one negative per pair, and hard negatives supply larger gradients.
On Yelp2018 one epoch takes 15.2s for LightGCN and 60.6s for SGL-ED in its alternative form, and the authors say this is consistent with their complexity analysis. The authors also note that the BPR loss begins its rapid decline slightly after recall begins its rapid rise, which they take as a gap between the pairwise loss and the ranking task.
Robustness to interaction noise
Noise is injected by adding 5%, 10%, 15% and 20% adversarial negative user-item interactions to the training set while the test set is unchanged. Both models lose performance as noise grows, but the drop for SGL is smaller than for LightGCN, and the gap between the two degradation curves widens with the noise ratio.
The authors interpret this as SGL comparing differently augmented views and so relying less on particular edges. On Amazon-Book, SGL with 20% added noisy interactions still scores above LightGCN trained on noise-free data. The authors observe that SGL is more robust on Yelp2018 than on Amazon-Book, and they attribute this to Amazon-Book being sparser so that noise affects its graph more strongly.
Temperature, pre-training and negatives
Raising \( \tau \) to 1.0 lowers performance and slows convergence, while setting it to 0.1 also hurts, because a few negatives then dominate the gradient. The authors suggest tuning \( \tau \) in the range 0.1 to 1.0 with care.
Pre-training the self-supervised task and then fine-tuning LightGCN (SGL-pre) gives Recall 0.0653 on Yelp2018 and 0.0429 on Amazon-Book, below the joint SGL-ED values of 0.0675 and 0.0478. SGL-pre still beats the LightGCN results in Table 3, which the authors take as evidence that the auxiliary task gives a useful initialisation, while joint training is better.
On Amazon-Book, the user-and-item separated batch variant SGL-ED-batch scores Recall 0.0472 against 0.0464 for SGL-ED-merge, which does not separate node types. On Yelp2018 the two variants are nearly tied, with SGL-ED-merge slightly higher on Recall (0.0671 against 0.0670), so the paper's claim that the batch variant is better holds clearly only on Amazon-Book.
SGL-ED-batch performs on a par with SGL-ED, which treats all users and items as negatives, so mini-batch negatives are an efficient alternative.
Limitations
The two views use the same dropout and masking ratios, and the authors leave tuning different ratios for the two views to future work. The LightGCN results on Yelp2018 and Amazon-Book are copied from the original LightGCN paper rather than rerun in this study. DNN+SSL is applied to ID embeddings because no item features are available, which differs from its original feature-based setting.
The studies of the temperature, pre-training and negatives are reported without Alibaba-iFashion, which the authors say follows the same trend as the other two datasets. The timing comparison was measured on one hardware platform, and the analytical factor of 3.7x for the alternative form is stated only for Yelp2018 with keep probability 0.8.
The hard-negative account in the excerpt rests on gradient analysis and the temperature study; no separate experiment measures hard-negative sampling directly.
Paper info
- Authors
- Jiancan Wu, Xiang Wang, Fuli Feng, Xiangnan He, Liang Chen, Jianxun Lian, Xing Xie
- Venue
- arXiv · Preprint
- First published
- 2020-10-21
- Added
- 2026-11-13
- Updated
- 2021-6-18
- Version
- v4
- arXiv
- 2010.10783
- DOI
- 10.1145/3404835.3462862
- Category
- cs.IR · cs.LG
- Original paper terms
- CC0 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Jiancan Wu, Xiang Wang, Fuli Feng, Xiangnan He, Liang Chen, Jianxun Lian, Xing Xie (2020). Self-supervised Graph Learning for Recommendation. arXiv:2010.10783v4. https://doi.org/10.1145/3404835.3462862
BibTeX
@article{wu2020self,
title = {{Self-supervised Graph Learning for Recommendation}},
author = {Jiancan Wu and Xiang Wang and Fuli Feng and Xiangnan He and Liang Chen and Jianxun Lian and Xing Xie},
year = {2020},
eprint = {2010.10783},
archivePrefix = {arXiv},
doi = {10.1145/3404835.3462862},
url = {https://arxiv.org/abs/2010.10783v4}
}