# Prototypical Graph Contrastive Learning for Recommendation
## 4 Experiments
### Hyperparameter Analysis (RQ4)  
We conducted experiments to analyze the impact of key parameters on ProtoRec to determine their optimal values. Some parameters were set according to convention in all experiments. The batch size was 2048; the embedding size was 64. The regularization coefficient \(\lambda_{2}\) was typically set to a small value to avoid excessive penalization. Based on mainstream baseline methods and experimental tests, ProtoRec uses a value of \(1\times 10^{-4}\)across different datasets to achieve the most stable training results. All parameters were adjusted using a grid search strategy. The possible value ranges for all parameters were obtained from related work, and a generally optimal value was set. The search was conducted around this value until the optimal value was found. The search stopped when the performance began to decline in a particular direction. **The impact of \(L\). ** The number of graph convolutional layers \(L\) is tuned within {1, 2, 3, 4, 5}, and the performance of ProtoRec varies significantly across different layer settings. Smaller values result in underfitting, while larger values lead to over-smoothing and increased complexity. The experimental results show that the optimal values for \(L\) on the three datasets are 2, 3, and 4, respectively. **The impact of \(\lambda_{1}\). ** The parameter \(\lambda_{1}\) is utilized to control the weight of InfoNCE on overall optimization objective. As shown in the first image of Figures 5-7, \(\lambda_{1}\) has a significant impact on recommendation performance. On large-scale datasets, ProtoRec focuses more on optimizing the CL loss, requiring a larger value for \(\lambda_{1}\). Conversely, on small-scale datasets, ProtoRec tends to prioritize optimizing the BPR loss, often necessitating a smaller value for \(\lambda_{1}\). It is recommended to search this parameter within the range of 0 to 1 with a step size of 0.1. The search process can be terminated when performance starts to decline, as there is generally only one peak optimal solution. Therefore, the optimal values of \(\lambda_{1}\) on the Yelp2018, Douban-book, and Amazon-book datasets are 0.3, 0.1, and 1.0, respectively. **The impact of \(\tau\). ** The temperature coefficient \(\tau\) adjusts the similarity distribution in InfoNCE. As the value of \(\tau\) decreases, the distribution becomes sharper, enhancing the discriminative power of positive samples. Conversely, as the value of \(\tau\) increases, the distribution becomes smoother, improving generalization ability. The impact of \(\tau\) on different datasets is illustrated in the second images of Figures 5-7. Both large and small values of \(\tau\) can lead to a sharp decline in performance. Although the temperature coefficient \(\tau\) can take on very large values, smaller values often yield the optimal solution in ProtoRec. Therefore, it is advisable to test values within the range of 0 to 1 with a step size of 0.1. A sharp performance decline is typically observed near the optimal value, and parameter tuning can be stopped when this phenomenon occurs. Hence, the optimal value across all datasets is 0.2. **The impact of \(k\). ** The parameter \(k\) is used to control the prototype numbers extracted by K-means. Exceeding the appropriate number of prototypes can partition the data into clusters with overlapping features. Conversely, insufficient prototypes may impede the accurate extraction of the data's underlying preferences. Due to ProtoRec's strong fitting capability, smaller values of \(k\) are often sufficient to extract appropriate prototypes. The third images of Figures 5-7 illustrate the impact of \(k\) values ranging from 0 to 120 on recommendation performance. The curves show a gradual decline in performance as the number of prototypes increases (even reaching several thousand), and ProtoRec becomes increasingly time-consuming. ProtoRec does not have strict requirements on the number of prototypes. During grid search, a relatively large interval can be used for exploration.