## 3 Methodology
### Preliminaries  
The task of railway deformation risk prediction is formulated as a spatiotemporal learning problem that leverages both spatial and temporal data to forecast risk scores for railway deformation. Let \(\mathcal{R}=\{r_{1},r_{2},\ldots,r_{N}\}\) represent the set of railway segments under consideration, where \(N\) is the total number of segments. Each segment \(r_{i}\) is associated with spatial attributes and temporal observations. These attributes are influenced by complex interactions, including deformation patterns, external environmental factors, and the underlying physical structure of the railway. For spatial features, we define a spatial feature matrix \(\mathbf{X}_{s}\in\mathbb{R}^{N\times F_{s}}\), where \(F_{s}\) is the number of spatial features derived from InSAR images, such as mean deformation velocity, coherence, terrain slope, and curvature. These spatial features reflect the local and regional conditions that contribute to deformation risks. The spatial relationships between railway segments are encoded using an adjacency matrix \(\mathbf{A}\in\mathbb{R}^{N\times N}\). The entry \(\mathbf{A}_{ij}\) quantifies the similarity or connection strength between segments \(r_{i}\) and \(r_{j}\), computed using spatial proximity or geophysical properties. For simplicity, \(\mathbf{A}\) can be normalized as  
\[\mathbf{\tilde{A}}=\mathbf{D}^{-1/2}\mathbf{A}\mathbf{D}^{-1/2}, \tag{1}\]  
where \(\mathbf{D}\) is the degree matrix with \(\mathbf{D}_{ii}=\sum_{j}\mathbf{A}_{ij}\). This normalized adjacency matrix ensures that the spatial dependencies are scaled consistently. For temporal features, we represent sequential observations as a temporal feature matrix \(\mathbf{X}_{t}\in\mathbb{R}^{T\times F_{t}}\), where \(T\) denotes the length of the time series and \(F_{t}\) represents the number of temporal attributes, such as historical deformation values, precipitation, temperature, and maintenance activities. Each row \(\mathbf{x}_{t}^{i}\) in \(\mathbf{X}_{t}\) represents the feature vector at time step \(j\). These temporal features exhibit nonlinear dynamics and dependencies that require advanced models, such as recurrent neural networks or attention mechanisms, for effective analysis. The objective is to predict the deformation risk for all segments over a given time horizon. Let \(\mathbf{\hat{Y}}\in\mathbb{R}^{N\times T^{\prime}}\) represent the predicted risk matrix, where \(T^{\prime}\) is the forecast horizon. The task is formally expressed as  
\[\mathbf{\hat{Y}}=f(\mathbf{X}_{s},\mathbf{X}_{t},\mathbf{\tilde{A}};\Theta), \tag{2}\]  
where \(f(\cdot)\) is the predictive model parameterized by \(\Theta\). The function \(f(\cdot)\) must integrate both spatial and temporal features while accounting for their interdependencies. To enhance predictive accuracy, we introduce external factors \(\mathbf{E}\in\mathbb{R}^{T\times F_{t}}\), where \(F_{t}\) is the number of external features, such as meteorological data and traffic load. These factors are incorporated into the temporal modeling to capture their influence on deformation dynamics. The complete input representation is then defined as  
\[\mathbf{Z}=[\mathbf{X}_{s},\mathbf{X}_{t},\mathbf{E}], \tag{3}\]  
where \([\cdot]\) denotes the concatenation operation along the feature dimension. Finally, the loss function used to train the predictive model is defined as the mean squared error (MSE) between the predicted and true deformation risks:  
\[\mathcal{L}=\frac{1}{NT}\sum_{i=1}^{N}\sum_{t=1}^{T^{\prime}}(\hat{y}_{i,t}-y_ {i,t})^{2}, \tag{4}\]  
where \(\hat{y}_{i,t}\) and \(y_{i,t}\) are the predicted and ground truth risk scores for segment \(i\) at time \(t\), respectively. This formulation ensures a comprehensive spatiotemporal approach for railway deformation risk prediction. However, in real-world railway deformation scenarios, systematic trends may exist due to geophysical factors, long-term degradation patterns, or environmental influences.