# CQFormer: Cyclic Quasi-Dynamic Transformers for Hourly Origin-Destination Estimation
## 6 Conclusions  
Dynamic origin-destination estimation is an important and challenging problem due to its under-determination and high non-linearity. By introducing the quasi-dynamic assumption, this paper proposes an effective attention-based neural network, called CQDFormer. The proposed CQDFormer consists of forward and backward transformers, where the forward transformer performs OD estimation and the backward one approximates the traffic assignment process. The correlations between traffic count vectors for each sub-period are extracted by the self-attention modules to capture path selection information and used in the learning process in both directions. During the training process, the data generated by the simulation is used for separate training of forward and backward learning, while the real traffic count data are used for training of cyclic consistency to calibrate the differences between the simulation and the real environment.  
We evaluate the effectiveness of CQDFormer through a real urban road network in Haikou, China. In the experiments, we find that the quasi-dynamic assumption can effectively address the under-determination challenge in OD estimation. Accurate generation of OD matrices can be achieved through traffic count vectors in multiple sub-periods, and gradient-based methods, such as neural networks, have strong estimation capabilities in this process. Particularly, the proposed CQDFormer converges quickly and achieves outstanding results in RMSE, MAE, MAPE, and \(R^{2}\) compared with the benchmark methods. We select 10,000 OD flows to plot the correspondence between the estimated values and the real values, which shows that CQDFormer can achieve excellent estimation of OD flows of different magnitudes and has the potential to be applied in various traffic states--both congested and uncongested states.  
The limitation of this study is that the current data-driven OD estimation method suffers from dependence on specific road topology scenarios, and the process of data generation and training has to be repeated for the application under different road networks, which will be a time-consuming process. Future research can attempt to introduce the road structure into OD estimation frameworks through graph neural networks.  
Figure 9: The loss curves of neural networks.  
**Author Contributions:** Conceptualization, G.L., J.W. and Y.H.; methodology, G.L.; validation, G.L., J.W., Y.H. and D.L.; investigation, G.L.; writing--original draft preparation, G.L. and Y.H.; writing--review and editing, G.L., J.W., Y.H. and D.L.; visualization, G.L. and Y.H.; supervision, J.W.; project administration, J.W. All authors have read and agree to the published version of the manuscript.  
**Funding:** This research received no external funding.  
**Institutional Review Board Statement:** Not applicable.  
**Informed Consent Statement:** Not applicable.  
**Data Availability Statement:** The data is not publicly available due to the commercial restrictions.  
**Acknowledgments:** The authors acknowledge support from the Center of High Performance Computing, Tsinghua University.  
**Conflicts of Interest:** The authors declare no conflict of interest.