A similarity matrix is a tabular structure whose entries quantify similarity between every pair of items. For node embeddings, cosine similarity compares all nodes and supports nearest-neighbor product recommendations. section 3.1.5
A practical recommendation workflow proceeds as follows:
- Run the trained graph neural network in evaluation mode to produce node embeddings. section 3.1.5
- Compute pairwise cosine similarities across the embeddings. section 3.1.5
- Select a product row, sort similarities in descending order, and map the resulting node indices to product IDs. section 3.1.5
Product bundle generation
For a selected Marceline vinyl figure, the matrix ranks six nearby product embeddings to create a loosely related Toy & Games bundle. section 3.1.5
gcn_similarity_matrix = cosine_similarity(gcn_embeddings.cpu().numpy())
This listing constructs the matrix with scikit-learn from CPU-converted node embeddings. section 3.1.5


