## 3 Methods
### Dual-Channel Deep Counterfactual Prediction Model for OD Matrix Prediction
#### 3.3.2 Factual and Counterfactual OD Passenger Flow Prediction  
Define \(N\) as the total number of urban rail transit (URT) stations, \(T\) as the prediction time window length, \(M\) as the station semantic embedding dimension, \(H\) as the hidden layer dimension and \(K\) as the number of incident types. To explicitly model the spatiotemporal deviations induced by operational incidents, our prediction framework simultaneously integrates factual and counterfactual OD passenger flow tensors, leveraging multiple data sources including shared station semantic embeddings, historical station outflow sequences, incident occurrence indicators, incident type information, and network topology. Specifically, denote \(\boldsymbol{\mathcal{F}}\in\mathbb{R}^{N\times N\times T}\) and \(\boldsymbol{\mathcal{C}}\in\mathbb{R}^{N\times N\times T}\) as factual and counterfactual OD tensors, respectively. Additionally, denote \(\boldsymbol{E}\in\mathbb{R}^{N\times M}\) as the station semantic embedding obtained via contrastive learning, \(\boldsymbol{O}\in\mathbb{R}^{N\times T}\) as historical outflow sequences, \(\psi\in\{0,1\}\) as the incident indicator (1 for incident scenarios, 0 for normal operations), \(\gamma\in\{0,1\}^{K}\) as the incident-type one-hot encoding vector, and \(\boldsymbol{A}\in\{0,1\}^{N\times N}\) as the binary adjacency matrix representing network topology. To capture temporal dynamics and station heterogeneity, the semantic embeddings and historical outflow data for each station are firstly concatenated as follows:  
\[\mathbf{z}_{i}=\mathbf{O}_{i}\oplus\mathbf{E}_{i}\in\mathbb{R}^{T+M} \tag{8}\]  
This integrated tensor \(\mathbf{z}_{i}\) is subsequently processed by a two-layer fully connected neural network with ReLU activation to predict station-level passenger outflows at the subsequent time interval:  
\[\mathbf{\hat{o}}_{i}=\mathbf{W}_{2}^{\top}\text{ReLU}(\mathbf{W}_{1}\mathbf{z}_{i}+\mathbf{b}_{1}) +\mathbf{b}_{2} \tag{9}\]  
where \(\mathbf{W}_{1}\in\mathbb{R}^{H\times(T+M)}\), \(\mathbf{W}_{2}\in\mathbb{R}^{H}\), \(\mathbf{b}_{1}\in\mathbb{R}^{H}\) and \(\mathbf{b}_{2}\in\mathbb{R}\) denote trainable weight and bias parameters. The resulting outflow predictions inform subsequent OD matrix decomposition by providing station-level passenger volume constraints. For capturing OD-specific spatiotemporal correlations, spatial and temporal features are derived from historical OD tensors as follows:  
\[\mathbf{U}^{F}=\sum_{t=1}^{T}\mathbf{\mathcal{F}}_{i,j,t},\forall i,j\in I\wedge i\
eq j \tag{10}\]  
\[\mathbf{U}^{CF}=\sum_{t=1}^{T}\mathbf{C}_{i,j,t},\forall i,j\in I\wedge i\
eq j \tag{11}\]  
\[\mathbf{V}^{F}=\sum_{j=1}^{N}\mathbf{\mathcal{F}}_{i,j,t},\forall i\in I\wedge t\in T \wedge i\
eq j \tag{12}\]  
\[\mathbf{V}^{CF}=\sum_{j=1}^{N}\mathbf{\mathcal{C}}_{i,j,t},\forall i\in I\wedge t\in T \wedge i\
eq j \tag{13}\]  
Here, \(\mathbf{U}^{F}\) and \(\mathbf{U}^{CF}\) represent spatial aggregation, while \(\mathbf{V}^{F}\) and \(\mathbf{V}^{CF}\) represent temporal aggregation under factual and counterfactual conditions, respectively.