# Social)GCF: Social Recommendation with Jacobi Polynomial-Based Graph Collaborative Filtering
## 4 Experiments  
### Experimental Setup  
The experiments are conducted on two real-world datasets, LastFM and epinions. LastFM is a music-related dataset and contains information about the social network between users and their interactions with items. Epinions is a shopping dataset which also contains the trust network between users. Compared with ciao, used in SocialLGN [40], epinions is significantly sparser and more challenging, thus making it more suitable for comparing the performance of algorithms. The statistics of the two datasets are in Table 2.  
For each dataset, 80% of the interaction data are randomly selected for the training set, and the rest are used as the test set. Moreover, 10% of the training set is used as the validation data.  
SocialJGCF is compared with recent recommender system baselines. The baselines are listed below:  
1. BPR [43]: a classical matrix factorization method.
2. LightGCN [19]: a graph-based model which simplifies graph convolution operations for recommender systems.
3. SocialLGN [40]: a LightGCN-based social recommendation model which combines social information and interaction data.  
In this paper, three commonly used metrics, precision, recall, and Normalized Discounted Cumulative Gain (NDCG), are used to evaluate the top-K recommendation. The precision metric is the ratio of the recommendation list in the real record,  
\[Precision@K=\frac{\sum l_{rec}^{u}\cap R_{u}}{N},\]  
where \(l_{rec}^{u}\) is the top-N recommendation list of user \(u\) and \(R_{u}\) represents the set of items that user \(u\) interacted with in the dataset. The recall is the percentage of how many user-item records are included in the final recommendation list.  
\[Recall@K=\frac{\sum l_{rec}^{u}\cap R_{u}}{\sum R_{u}}.\]  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Dataset** & **LastFM** & **Epinions** \\ \hline User \# & 1892 & 22,164 \\ \hline Item \# & 17,632 & 296,277 \\ \hline Interaction \# & 92,834 & 922,267 \\ \hline Interaction Density & 0.278\% & 0.140\% \\ \hline Relation \# & 25,434 & 355,494 \\ \hline Relation Density & 0.711\% & 0.072\% \\ \hline \hline \end{tabular}
\end{table}
Table 2: Statistics of the two datasets.  
NDCG describes the accuracy of the recommendation list, and is computed as the average of all users' NDCG:  
\[NDCG@K(u)=\frac{DCG(u)}{IDCG(u)},\]  
\[DCG(u)=\sum\frac{2^{rel_{j}}-1}{\log_{2}(j+1)},\]  
where \(rel_{j}\) is the relevance score of the item at position \(j\) and \(rel_{j}=1\) only when the \(jth\) item in the recommendation list is adopted by the user. The IDCG, the ideal discounted cumulative gain, is the best possible DCG that could be achieved if all items were ranked in the perfect order of relevance. Moreover, a full-ranking strategy is adopted, and all the items are ranked. This paper reports the performance with \(K=10,\ 20\).  
In this paper, we optimize the model parameters \(E_{S}^{(0)},E_{U}^{(0)},E_{I}^{(0)}\), which are the initial embedding for users in the social graph and the users and items in the user-item interaction graph, respectively, by minimizing the Bayesian Personalized Ranking (BPR) loss [43]:  
\[L_{BPR}=\sum-\ln\bigl{(}y_{ui}-y_{uj}\bigr{)}+\lambda\Bigl{|}\Bigl{|}E^{(0)} \Bigr{|}\Bigr{|}^{2},\]  
where \(E^{(0)}\) is the initial embeddings of all users and all items from the embedding layer. The BPR loss encourages the recommender system to assign a higher ranking score to those interaction pairs that already exist in the dataset than to those that do not exist in the dataset.  
SocialJGCF is implemented based on the SocialLGN repository using PyTorch 2.5. All the models are optimized using Adam with a \(1\times 10^{-3}\) learning rate and the hyperparameters of the baseline models are chosen according to the suggestion in their papers. The embedding size is set to be 64. The number of propagation layers \(K=3\). The experiments are conducted on an RTX 4090 GPU (NVIDIA, Santa Clara, CA, USA).