## 2 Methods
### Sequence-to-Sequence Learning for Temporal Dynamics Modeling
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **Baseline Parameter** & **Hyper Parameter** & **MAPE** & **MAE** & **RMSE** \\ \hline \multirow{4}{*}{LSTM} & RNN Layer = 2 & RNN Units = 32 & 38.93\% & 6.34 & 9.49 \\  & Dropout = 0.2 & RNN Units = 64 & 40.93\% & 6.48 & 9.65 \\  & Dropout = 0.2 & RNN Units = 128 & 39.23\% & 6.29 & 9.43 \\  & RNN Units = 256 & 38.06\% & 6.43 & 9.76 \\ \hline \multirow{4}{*}{GRU} & RNN Layer = 2 & RNN Units = 32 & 38.90\% & 6.33 & 9.45 \\  & RNN Layer = 2 & RNN Units = 64 & 44.23\% & 6.64 & 9.73 \\ \cline{1-1}  & Dropout = 0.2 & RNN Units = 128 & 39.90\% & 6.37 & 9.54 \\ \cline{1-1}  & RNN Units = 256 & 38.65\% & 6.56 & 10.03 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Selection of hyperparameters on LSTM and GRU. Figure 7: Model comparison between DCRNN and the baseline models. The similar values of MAE or RMSE indicate that the average difference between the absolute or squared values of the prediction errors is not significant, which means that the model has a balanced capability to reduce the size of prediction errors. Nonetheless, if the MAPE metric is smaller, it means that the model's prediction capability is more balanced and robust for very small and very large values. This indicates that the DCRNN has a more consistent performance in bus passenger flow forecasting with smaller prediction errors for the case of smaller predicted values, making it more reliable than the classic LSTM and GRU models. ### Discussion

An accurate prediction of bus passenger flow is significantly important for the improvement of transit service efficiency by optimizing the allocation of service resources. For real-time bus operation, short-term passenger flow prediction is needed for bus operators to better understand the changes in passenger flow during different time periods, as well as the distribution of passenger flow among different bus routes. Thus, they can dispatch the vehicles and crews to match the bus passengers' travel demand more precisely, avoiding service hazards such as overcrowding/overloading, long waiting times, etc., thereby improving the passengers' experience. The challenge of optimizing the real-time dispatching strategies of bus operations lies in how to better re-allocate the limited bus vehicles and crews from low-demand bus lines to high-demand bus lines. In other words, to support the high-demand bus routes, it is crucial to ensure the basic level of service of the low-demand lines, meaning that the passengers in low-demand routes should not be significantly affected. Therefore, to relocate the bus resources to high-demand routes, the prediction of travel demand in low-demand routes is essential for maintaining the level of bus service. Since neural networks capture more non-linear features compared with traditional machine learning models [16], in this work, we can find that the LSTM, GRU, and DCRNN models all significantly outperform the other three models, i.e., the static, HA, and VAR. Compared with the LSTM and the GRU models, the DCRNN adopted in this work that incorporates spatial interactions between bus lines has a lower value of MAPE. This indicates that the model is more accurate and sensitive in forecasting the travel demand in low-demand bus routes, which can provide better support for real-time inter-line operation for bus operators with more precise prediction in the ridership of low-demand bus lines. Although LSTM and GRU are widely implemented for time series prediction, they are not able to capture the spatial dependencies among different routes in the bus network. DCRNN, however, leverages diffusion convolution to capture spatiotemporal dependencies, thereby achieving more accurate predictions of bus passenger flows. What has to be noted is that the DCRNN model has a more complex architecture that requires a large amount of data for training. The training time spent for DCRNN is quadruple the time spent for LSTM and GRU.