## 3 Methods
### Dual-Channel Deep Counterfactual Prediction Model for OD Matrix Prediction
#### 3.3.3 Loss Function and Prediction Accuracy Evaluation Metrics
The specific composition, mileage, and station number for each sub-network are outlined in Table 1.

Figure 4: Line and station distribution of the Shanghai urban rail transit network. Figure 5 illustrates the weekly variation in passenger flow under normal conditions for each sub-network. The flow patterns exhibit clear cyclical behavior, with significant peaks during weekdays and more irregular, lower-level distributions on weekends. The high passenger flow group consistently shows notably higher ridership levels on weekends compared to the medium and low passenger flow groups. Specifically, incidents included in the datasets are categorized as follows: Power equipment incidents (5.4%), Object intrusion (3.8%), Trackside equipment incidents (6.6%), Signal equipment incidents (25.8%), Train incidents (30.2%), and Door incidents (28.2%). The incident datasets were randomly divided into training, validation, and testing subsets with proportions of 70%, 20%, and 10%, respectively. A descriptive analysis of passenger flow patterns under various incident conditions was included to clearly demonstrate the real-world relevance and potential applicability of our model, as in Figure 6. \begin{table}
\begin{tabular}{c c c c} \hline
**Study Case** & **Network Composition** & **Network Mileage** & **Number of Stations** \\ \hline High passenger flow & Line-1, Line-2, Line-9 & 163.14 km & 90 \\ Medium passenger flow & Line-3, Line-12, Line-13 & 119.59 km & 88 \\ Low passenger flow & Line-6, Line-7, Line-16 & 136.42 km & 72 \\ \hline \end{tabular}
\end{table} 
Table 1: Network composition, mileage, and station number of the study cases. Figure 5: Weekly passenger flow variation trend in different cases under factual scenarios. This Figure illustrates the weekly variation in passenger flow under normal conditions for each sub-network: **(a)** High passenger flow case, **(b)** Mid passenger flow case, and **(c)** Low passenger flow case. The flow patterns exhibit clear cyclical behavior, with significant peaks during weekdays and more irregular, lower-level distributions on weekends. The high passenger flow group consistently shows notably higher ridership levels on weekends compared to the medium and low passenger flow groups. In terms of land use semantics, this study incorporates Points of Interest (POI) data within a 500 m radius around each OD pair's origin and destination stations. These POIs are categorized into work, residential, education, healthcare, and commercial entertainment. Additionally, proximity to key land use features, such as universities, central business districts (CBDs), transport hubs, and bus stations, is considered. The corresponding data, shown in Figure 7, reveals significant differences in land use patterns across the three passenger flow groups. The high flow group tends to be located closer to densely populated areas such as CBDs and transport hubs, whereas the medium and low flow groups exhibit more varied land use characteristics. Commercial and entertainment POIs are the most common across all sub-networks, though the high flow group demonstrates a stronger concentration of these POIs near transport hubs and central business districts. Figure 6: Daily passenger flow variation trend in different cases under incident scenarios. This figure shows the passenger flow patterns under different incident conditions. (**a**) represents Power equipment incidents, accounting for 5.4% of the total incidents; (**b**) represents Object intrusion, accounting for 3.8%; (**c**) represents Trackside equipment incidents, accounting for 6.6%; (**d**) represents Signal equipment incidents, accounting for 25.8%; (**e**) represents Train incidents, accounting for 30.2%; (**f**) represents Door incidents, accounting for 28.2%. The incident datasets were randomly divided into training, validation, and testing subsets with proportions of 70%, 20%, and 10%, respectively.