Evaluating GraphSAGE Aggregators for E-Commerce Recommendation Using Sentence-BERT and Multi-Entity Graph
Abstract
The rapid growth of e-commerce catalogs contributes to information overload, making it difficult for consumers to find relevant products. Conventional recommendation methods like Matrix Factorization face sparsity and limitations in capturing complex multi-entity interactions. To overcome this, Graph Neural Networks (GNNs), specifically the Graph-SAGE algorithm, are implemented for their inductive ability to deeply model relational structures and generate consistent embeddings. This study evaluates four GraphSAGE aggregators (Mean, Graph Convolutional Network (GCN), Max-Pooling, and Long Short-Term Memory (LSTM)) to find the most effective representation for product recommendation systems. The novelty lies in constructing a heterogeneous multi-entity graph (User, Item, Category) using implicit feedback, inte-grated with Sentence-BERT (SBERT) textual, numerical, and categorical features. Evaluated on the Amazon Reviews 2023 Musical Instruments dataset, the results show that the Mean and GCN aggregators yield statistically comparable top-tier performances. The Mean aggregator records the highest raw scores in overall ranking performance (Precision: 0.9318, Area Under Curve (AUC): 0.9618, Mean Average Precision (MAP): 0.9633, Normalized Discounted Cumulative Gain (NDCG): 0.9970). However, GCN offers an optimal trade-off by proving to be the most computationally efficient (72.46 MB peak Video Random Access Memory (VRAM), 0.80 seconds execution time) while achieving the highest classification balance (F1-Score: 0.8856). Meanwhile, Max-Pooling demonstrates moderate overall performance. Lastly, LSTM shows the lowest performance due to the incompatibility of random-permutation-based sequential processing on inherently unordered graph data. These findings demonstrate that within SBERT-enriched heterogeneous graphs, selecting the appropriate aggregator is essential to optimize both recommendation accuracy and computational efficiency.