## 3 Predicting Missing Soil Heavy-Metal Values Based on SA-FOA-BP
### Construction of Graph Convolutional Networks Integrating Spatial Information  
GCN (Graph Convolutional Network) is a deep learning method for handling data with graph-like properties. Its main purpose is to extract spatial features from data by leveraging the relationships between data points. Currently, graph convolution includes graph convolutional neural networks based on the spatial domain (vertex domain) and graph convolutional neural networks based on the spectral domain. Figure 3 shows the GCN structure diagram. A GCN that integrates spatial information includes a spatial information encoder that is used to learn the contextual information of point coordinates throughout the GCN training process. In constructing the SE-GCN, spatial information and point-of-interest information are fused as the model input, and the SE-returned coordinates are embedded into a matrix and connected with other node features to provide training data for the GCN operator. The SE-GCN predicts the output of Moran's I index of spatial autocorrelation as an auxiliary prediction result. The Moran's I index was obtained by constructing a new training graph based on the k-nearest neighbors [28] from a randomly sampled batch of points during each training; the final result was obtained through prediction of the local Moran's I index and SE-GCN [29]. The model structure of the SE-GCN is shown in Figure 4.  
We assumed a randomly sampled batch of points B, where \(p_{1},\ldots,p_{n_{batch}}\in B\) is one of the points in \(c_{1},\ldots,c_{n_{batch}}\). Using the coordinates of B, a spatial graph was constructed using the k-nearest neighbor algorithm, and the adjacency matrix \(\mathbf{A}_{B}\) was obtained. Next, the coordinates were embedded into a latent space using a spatial information encoder consisting of trigonometric functions and a single fully connected neural network, resulting in the coordinate-embedding vector \(\mathbf{C}_{B}^{emb}=\epsilon_{1}^{emb},\ldots,\epsilon_{n_{batch}}^{emb}\). The output of the spatial information encoder was connected to the node features to create the input for the first layer of the SE-GCN, denoted as  
\[\mathrm{H}^{(0)}=concat(X_{B},C_{B}^{emb}) \tag{14}\]  
Figure 3: GCN structure diagram. To incorporate the local Moran's I index into the SE-GCN, the measurement \(I(\mathbf{Y}_{B})\) of the resulting variable \(\mathbf{Y}_{B}\) was calculated using the formula for the local Moran's I index at the beginning of each training based on the spatial weights of the adjacency matrix \(\mathbf{A}_{B}\). \(\mathbf{Y}_{B}\) and \(I(\mathbf{Y}_{B})\) were predicted. \[\hat{\mathbf{Y}}_{B}=\mathrm{H}^{(I)} \tag{15}\]  
\[I(\hat{\mathbf{Y}}_{B})=\mathrm{H}^{(I)}_{aux} \tag{16}\]  
The loss of SE-GCN can be calculated using any regression criterion, such as the mean squared error (MSE):  
\[loss=MSE(\hat{\mathbf{Y}}_{B},\mathbf{Y}_{B})+\lambda MSE(I(\hat{\mathbf{Y}}_{ B}),I(\mathbf{Y}_{B})) \tag{17}\]  
where \(\lambda\) represents the weight of auxiliary learning. The steps for using the SE-GCN model to predict soil heavy-metal content are presented as follows. 1. Determine the graph structure; input the training dataset of soil heavy metal sampling points, including all features of the spatial dimension, the pollution source dataset, and input of sampling points to form an input vector. Integrate the characteristics of pollution sources to construct an adjacency matrix. Initialize the model parameters. 2. The model performs spatial feature extraction. The spatial features of each sampling point are extracted from the graph convolutional neural network. The coordinate embedding matrix obtained using the spatial information encoder is connected to the node features extracted by the model to provide training data for the GCN operator. 3. Further model training, output Moran's I index of spatial autocorrelation, and provide auxiliary learning for prediction results. 4. Iteratively learn the SE-GCN model, calculate its loss function value, iterate continuously, and obtain an optimal SE-GCN model. 5.