## 3 Proposed Model
### AKNN Graph Construction  
The traditional KNN graph construction method has significant limitations [27]. Namely, it has only one hyperparameter k; as a result, the choice of k directly determines the performance of the method. At present, the selection of k mainly depends on empirical judgment with certain limitations. In addition, the single k value is not suitable for all nodes, especially in imbalanced datasets, and often performs poorly. This is because when the samples are imbalanced, the method is biased toward the class with a dominant sample number. For classes with a small number, the accuracy of class prediction is very low. Furthermore, the KNN graph construction method does not use the label information of the training set, resulting in unused information. To construct a graph structure with rich and accurate information, the concept of adaptive graph construction [28] is used for reference, and a graph construction method based on the principle of AKNN is introduced here. This method can adaptively select the k value according to the neighbors of each node. In addition, it can fully utilize the numerical and label information of the data to obtain deeper hidden information. The method introduces two new variables: the weight of neighbors W and the accuracy p. The graph construction process is as follows. First, the value range of k is set, that is, the number of edges connected to each node is set to 1-z, and the value of z is determined according to the number of nodes. Then, the weight of the neighbors of the node and the accuracy p corresponding to different k values for each node are calculated to determine the number of connected edges. The expression of the graph construction process is as follows:  
\[W_{ij}=exp\left(-{D_{ij}}^{2}/2\right) \tag{11}\]  
Figure 1: Structure of dynamic multi-attention graph convolutional networks based on adaptive graph construction (AKNN-DMGCN). \[node_{i}=sort(\max_{z}W_{ij}) \tag{12}\]  
\[p_{i}(t)=\frac{\sum_{m=1}^{t}\Bigl{[}Y_{i}==Y_{node_{i}(m)}\Bigr{]}W_{node_{i}(m )}}{t}\ \ \ t\in[1,z] \tag{13}\]  
\[\Bigl{[}Y_{i}==Y_{node_{i}(m)}\Bigr{]}=\left\{ \begin{array}{ll}0\ \ Y_{i} =Y_{node_{i}(m)}\\ 1\ \ Y_{i}\
eq Y_{node_{i}(m)}\end{array} \right. \tag{14}\]  
\[k_{i}=\max_{p_{i}(t)} \tag{15}\]  
Equation (11) calculates the weight between nodes, where \(W_{ij}\) is the weight of the edge between \(v_{i}\) and \(v_{j}\), and \(D_{ij}\) represents the Euclidean distance between \(v_{i}\) and \(v_{j}\). Equation (12) selects z neighbors of \(v_{i}\) with the largest weight and arranges them from large to small, where \(node_{i}\) indicates the set of the z neighbor nodes, and sort denotes arranging the nodes by weight from large to small. Equation (13) calculates the accuracy corresponding to different k values of \(v_{i}\), where \(p_{i}(t)\) denotes the corresponding accuracy p when \(v_{i}\) has t connected edges, which is a set containing z values; \(Y_{i}\) indicates the category to which \(v_{i}\) belongs; and \(Y_{nodei(m)}\) indicates the category of the node with the m-th largest weight among the neighbors of \(v_{i}\). Equation (14) is a judgment formula, that is, if the categories of two nodes are the same, it is one; otherwise, it is zero. Equation (15) calculates the most suitable k value for \(v_{i}\), where \(k_{i}\) represents t corresponding to the maximum value in \(p_{i}(t)\), and \(k_{i}\) is the optimal number of connected edges for \(v_{i}\). However, through experiments, it was found that most of the nodes in the graph structure constructed by the AKNN method have only one edge. This is because the weight function of the AKNN method results in a very small distinction between nodes with different distances, and the calculation function of the accuracy p leads to a high calculation cost of adding an edge. As a result, the AKNN method always tends to build a graph structure with a small number of edges while ignoring the extraction of important structural information, which is undesirable.