## 3 Methodology
### Model Architecture
#### 3.2.1 Matrix Factorization-Based Imputation Module  
In our study, the collected original dataset involves transfer flow, weather data, socioeconomic and demographic data, built environment data, business activity intensity data and POI data. In this case, the first variable is the target variable and the others are external factors. Before performing our prediction task, missing data repair is desirable due to the data loss that inevitably occurs during data collection, especially in extreme environments. In general, traditional repair techniques fail to effectively impute missing traffic value [34; 35], and so we introduced an LRMF model to fix incomplete transfer passenger flow in the study. In Figure 1, we show the procedure of the LRMF model, and its repair theory can be described as follows:  
Given the transfer passenger flow \(\mathbf{Y}\in\mathbb{R}^{M\times N}\), it can be decomposed into a spatial factor matrix \(\mathbf{W}\in\mathbb{R}^{R\times M}\) and a temporal factor matrix \(\mathbf{X}\in\mathbb{R}^{R\times N}\). The standard MF is below:  
\[\mathbf{Y}=\mathbf{W}^{T}\mathbf{X} \tag{2}\]  
Figure 1: Flowchart of the Joint-IF imputation and forecasting framework.  
The elementwise of MF satisfies the following Equation (3):  
\[\mathbf{\psi}_{i,t}=\mathbf{w}_{i}^{T}x_{t}+\varepsilon_{i,t} \tag{3}\]  
where \(\mathbf{w}_{i}\) is the \(i\)-th column vector of the spatial matrix \(\mathbf{W};x_{t}\) is the \(t\)-th column vector of the temporal matrix \(\mathbf{X}\) and \(\varepsilon_{i,t}\) represents the zero-mean noise.  
Although the above MF can fix missing/abnormal elements in the matrix using approximate decomposition and reconstruction, it cannot capture the time dependence between different columns in temporal factor matrix \(\mathbf{X}\). As such, we apply the autoregressive regularizer [36] to deal with the time dependence in \(\mathbf{X}\), and the formula is as follows:  
\[x_{t+1}=\sum_{k=1}^{d}\beta_{k}\bigotimes x_{t+1-u_{k}}+\mathbf{\eta}_{t} \tag{4}\]  
where \(\Pi=\{u_{1},\dots,u_{k},\dots,u_{d}\}\) is the time lag; \(d\) is the order from the autoregressive model; \(\beta_{k}\) denotes a \(R\times 1\) coefficient vector; \(\bigotimes\) refers to the Hadamard (element-wise) product and \(\mathbf{\eta}_{t}\) means the Gaussian noise term. Based on Equation (4), the sequence at the next moment can be estimated from the potential temporal matrix \(\mathbf{X}\) to forecast the \(\hat{x}_{t+1}\) at the next moment. Additionally, further, given the target variable \(\mathbf{Y}\) and the MF with training parameters, the general optimization problem can be summarized as Equation (5):  
\[\min_{\mathbf{W},\mathbf{X}^{\star}}\frac{1}{2}\sum_{(i,t)\in\Phi}\Big{(}\mathbf{\psi}_{i, t}-\mathbf{W}_{i}^{T}\mathbf{X}_{t}\Big{)}^{2}+\frac{\lambda_{\exists}\eta}{2}\|\mathbf{W} \|_{F}^{2}+\frac{\lambda_{\exists}\eta}{2}\|\mathbf{X}\|_{F}^{2} \tag{5}\]  
where \(\Phi\) refers to the set of \((i,t)\) pairs of the matrix elements; the factors \(\|\mathbf{W}\|_{F}^{2}\) and \(\|\mathbf{X}\|_{F}^{2}\) are applied for overfitting prevention and stability enhancement, and their coefficients \(\lambda_{\exists}\), \(\lambda_{\$}\) and \(\eta\) control the degree of normalization. By continuously solving the reverse gradient approximation, we can acquire the efficient matrices \(\mathbf{W}\) and \(\mathbf{X}\), then approximate the elements in \(\mathbf{Y}\) using \(\hat{\mathbf{\psi}}_{i,t}\approx\mathbf{w}_{i}^{T}\hat{x}_{t}\) and eventually repair missing traffic value in \(\mathbf{Y}\). In fact, our imputation module provides a scalable and flexible scheme to augment the quality of multivariate transfer passenger flow to facilitate the subsequent forecasting task.