# Collaborative Filtering Model of Graph Neural Network Based on Random Walk
## 3 Model Framework
### Random Walk Method  
In its most basic form, graph theory studies data structured as a graph. Three fundamental components make up a graph: the nodes, the edges, and the weights of the edges. A graph is a mathematical model that depicts a link between entities. Processing signals defined on an undirected connected weighted graph \(G=V\), \(E\), \(W\), where \(V\) is a finite number of vertices. \(V=v1\), \(v2\), \(v3\)... \(E\) denotes the collection of edges. \(E=e1\), \(e2\), and \(e3\) are the edges of the graph, and the edges are abstract representations of the relationship between the vertices. The vertices of the graph might be any actual or abstract individuals.  
Given a set of vertices \(V\), there are three common ways to construct a graph: the first is to construct a \(k\)-nearest neighbor graph: and each vertex in the graph is connected to only its \(k\)-nearest neighbors. The second is constructing a full graph: each node is connected to all other nodes. The third is to construct a hypergraph: the essential feature of a hypergraph is its hyperedges, which can connect more than two vertices (including two). Given a set of vertices \(V\), there are three common ways to construct a graph: the first is to construct a \(k\)-nearest neighbor graph--each vertex in the graph is connected to only its \(k\) nearest neighbors. The second is to construct a full graph: each node in the graph is connected to all other nodes. The third is to construct a hypergraph: the basic feature of a hypergraph is its hyperedges, which can connect more than two vertices (including two).  
Based on these three main factors, researchers have designed various methods to calculate the correlation between vertices in graphs [19]. This study is implemented by the random walk method [20] in graph embedding. Suppose that to personalize a recommendation to user \(u\), a random traversal of the user's item bipartite graph starts at node \(U\), which corresponds to user u. When the user walks past a node, the first decision is whether to continue or stop walking. The decision is made with probability \(\alpha\). The next step is to determine which direction the user should go. If the user decides to continue, a node is selected from the nodes pointed to by the current node according to a uniform distribution. After several random walks, the probability that a particular item will be visited converges to the value determined by \(\alpha\). Assume that an item is likely to be visited, in which case it will be given a greater weight in the final list, so the weight of the item inthe final recommendation list is its probability of being visited. The following equation can be generated by expressing the previous description in the form of an equation, as follows:  
\[GEPR(v)=\left\{\begin{array}{l}\alpha\sum\limits_{v^{\prime}\in\text{in}(v)} \frac{PR(v^{\prime})}{|\text{out}(v^{\prime})|}\;(v\
eq v_{u})\\ (1-\alpha)+\alpha\sum\limits_{v^{\prime}\in\text{in}(v)}\frac{PR(v^{\prime})} {|\text{out}(v^{\prime})|}\;(v=v_{u})\end{array}\right. \tag{3}\]  
In the formula, _PR(i) denotes the access_ probability of item \(i\), _out(i)_ denotes the out-degree of item node \(i\). \(\alpha\)determines the probability of further visits. In collaborative filtering, the above relationship between users and items is mainly represented as a two-dimensional matrix (user-item matrix).