## 1 Introduction  
A knowledge graph (KG) [1], which can be applied to simple machine learning and statistics, adds reasoning to achieve results that traditional models struggle to attain. KGs have been applied in many fields, such as environmental monitoring [2], crisis management [3], and tourism [4], and have achieved excellent results. KG reasoning methods are mainstream, from traditional logic reasoning to machine learning reasoning [5]. Inference techniques can be divided into path-based, feature-based, and autoencoder-based methods. Based on path reasoning, by identifying and classifying connection paths, one can judge the relationship among entities and complete reasoning tasks. Feature-based reasoning models do not focus on obtaining connection paths between entities but directly classify the features of the entities or the features of a given path to obtain the reasoning results. Based on the structure of the variational autoencoder (VAE) [6], a path model based on identifying the connection paths between entities and a feature model based on the advantages of perfect path quality judgment were combined to avoid their respective defects and ultimately achieved performance improvements.  
The research found that the DIVA model performed better than a single model based on path- and feature-based reasoning. In order to improve the stability of the existing KG reasoning model and deal with noisier environments, [PERSON] et al. [7] divided the knowledge graph reasoning problem into two steps: pathfinding and path reasoning. By improving the interaction between the two steps, the problem is constructed as a potential variable graph model. The path is regarded as the potential variable; the relationship is regarded as the variable that can be observed after a given entity pair; the pathfinding module is regardedas an a priori distribution to infer the potential link; and the path reasoning module is regarded as a likelihood distribution to divide the potential link into multiple categories, so as to better summarize the unknown situation. However, when the graph structure is more complicated, DIVA experiences an accuracy decline. Therefore, the focus of this paper is on improving the DIVA model by realizing the perceived features of the adjacent graph structure and solving the performance bottleneck of the original model. The contributions of this paper are as follows:  
* We propose a graph variational reasoning model framework (GraphDIVA), which combines a graph neural network and introduces a pretraining process to improve the reasoning performance of the knowledge graph.
* We introduce the GraphSAGE algorithm into the path reasoning module to generate the path feature matrix, enhance the model's perception of the graph structure, and improve the accuracy of the model.
* We demonstrate that our method can scale up to large KGs and achieve better results on two popular datasets.  
The rest of this article is arranged as follows. Section 2 reviews and discusses the work related to the knowledge inference algorithm. Section 3 describes the DIVA model, the GraphSAGE algorithm, and the GraphDIVA model structure and calculation process. Section 4 describes the dataset, training environment, path search module pretraining, and related parameter settings used in the experiments. Then, we verify the efficiency and effectiveness of our model through extensive experiments and analyze the experimental results. Section 5 concludes and discusses future work.