Cosine similarity compares vector embeddings by measuring how closely their directions align. Applied to node embeddings, it supports finding related items rather than generating predictions. section 3.1.5
Use cosine similarity to build a practical similarity workflow:
- Generate node embeddings with the trained graph model in evaluation mode and without gradient computation. section 3.1.5
- Create a similarity matrix by comparing every pair of embeddings with SciKit Learn’s cosine_similarity function. section 3.1.5
- Sort one node’s similarity scores in descending order, remove the selected node itself, and use the next highest entries as recommendations. section 3.1.5
Product bundle generation
Selecting node 123 identifies the Funko POP Television: Adventure Time Marceline Vinyl Figure. Ranking its embedding similarities produces a bundle of related Toys & Games products. section 3.1.5













