# Spatio-Temporal Heterogeneous Ensemble Learning Method for Predicting Land Subsidence
## 2 Methods
### Heterogeneous Ensemble Learning-Based Prediction Method
#### 2.2.1 Individual Models for Land Subsidence Prediction
DCRNN captures land subsidence propagation characteristics through diffusion convolutional layers and uses RNNs to handle time series data, adapting to nonlinear and dynamic changes [35]. This study selects the DCRNN model as the primary prediction model to account for the dynamic changes in spatio-temporal relationships. The DCRNN model prediction includes two steps. First, in the spatial dependency modeling stage, DCRNN models spatial dependencies through random walks on the graph and the state transition matrix \(D_{O}^{-1}\), as follows:  
\[P_{t|1}=\alpha\times D_{O}^{-1}\times P_{t}+(1-\alpha)\times P_{0} \tag{12}\]  
where \(P_{t}\) is the flow distribution at time step \(t\) and \(P_{0}\) is the initial distribution. In the diffusion convolution process, DCRNN applies a defined diffusion convolution operation to the graph signal and filter, combining the forward and backward diffusion processes to capture the upstream and downstream impacts, as follows:  
\[H^{(l+1)}=\left(W^{l}\times H^{l}+b^{l}\right)\bigodot M^{l} \tag{13}\]  
where \(H^{(l+1)}\) is the node representation of the \((l+1)\)-th layer, \(W^{l}\) is the weight matrix, \(b^{l}\) is the bias term, \(M^{l}\) is the diffusion matrix of the \(l\)-th layer, and \(\bigodot\) represents element-by-element multiplication. Then, in the temporal dynamic modeling stage, DCRNN uses gated recurrent units (GRUs) to model temporal dependencies and forms DCGRUs by replacing matrix multiplications in GRUs with diffusion convolutions. DCGRUs process time series data by resetting gates, updating gates, and utilizing candidate hidden state mechanisms, all combined with spatial diffusion information. Finally, the DCRNN uses a Seq2 Seq structure for multi-step prediction, with the encoder processing historical time series and the decoder generating predictions based on the final encoder state. Graph Multi-Attention Network model  
The GMAN model is an encoder-decoder architecture that integrates an attention mechanism, including the ST-Attention module (STAtt) with residual connections [37]. GMAN incorporates graph structure and temporal information into a multi-attention mechanism through spatio-temporal embeddings, enriching contextual information and enhancing the expression ability of spatio-temporal data [36]. The basic mechanism of the GMAN model prediction is as follows. First, the spatio-temporal embedding module learns vertex representations through the node2 vec method and inputs them into a two-layer, fully connected neural network to obtain spatial embedding. Since spatial embeddings provide only static representation, GMAN also introduces temporal embedding, encoding each time step into a vector, which is then processed through a fully connected neural network. The spatial embedding and temporal embedding are fused into the spatio-temporal embedding module (STE), which is defined as follows:  
\[e_{v_{i},t_{j}}=e_{v_{i}}^{S}+e_{t_{j}}^{T} \tag{14}\]  
The temporal attention module includes the spatial attention module, the temporal attention module, and the gated fusion. The model represents the input of the \(l\)-th block as \(H^{(l-1)}\) and the outputs of the spatial and temporal attention mechanisms as \(H^{(l)}_{S}\) and \(H^{(l)}_{T}\), respectively. After gated fusion, the output of the \(l\)-th block is obtained as \(H^{(l)}\). GMAN employs an encoder-decoder architecture with a residual-connected ST-Attention block to effectively capture and integrate features in both spatial and temporal dimensions, making it suitable for complex spatio-temporal data and multi-dimensional sequence prediction tasks.