{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/pdformer-propagation-delay-aware-dynamic-long","title":"PDFormer: Propagation Delay-Aware Dynamic Long-Range Transformer for Traffic Flow Prediction","arxiv_id":"2301.07945","date":"2023-01-19","proceeding":null,"authors":["Jiawei Jiang","Chengkai Han","Wayne Xin Zhao","Jingyuan Wang"],"abstract":"As a core technology of Intelligent Transportation System, traffic flow prediction has a wide range of applications. The fundamental challenge in traffic flow prediction is to effectively model the complex spatial-temporal dependencies in traffic data. Spatial-temporal Graph Neural Network (GNN) models have emerged as one of the most promising methods to solve this problem. However, GNN-based models have three major limitations for traffic prediction: i) Most methods model spatial dependencies in a static manner, which limits the ability to learn dynamic urban traffic patterns; ii) Most methods only consider short-range spatial information and are unable to capture long-range spatial dependencies; iii) These methods ignore the fact that the propagation of traffic conditions between locations has a time delay in traffic systems. To this end, we propose a novel Propagation Delay-aware dynamic long-range transFormer, namely PDFormer, for accurate traffic flow prediction. Specifically, we design a spatial self-attention module to capture the dynamic spatial dependencies. Then, two graph masking matrices are introduced to highlight spatial dependencies from short- and long-range views. Moreover, a traffic delay-aware feature transformation module is proposed to empower PDFormer with the capability of explicitly modeling the time delay of spatial information propagation. Extensive experimental results on six real-world public traffic datasets show that our method can not only achieve state-of-the-art performance but also exhibit competitive computational efficiency. Moreover, we visualize the learned spatial-temporal attention map to make our model highly interpretable.","url_abs":"https://arxiv.org/abs/2301.07945v3","url_pdf":"https://arxiv.org/pdf/2301.07945v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"pdformer-propagation-delay-aware-dynamic-long","repo_url":"https://github.com/BUAABIGSCity/PDFormer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"computational-efficiency","task_name":"Computational Efficiency"},{"task_slug":"graph-neural-network","task_name":"Graph Neural Network"},{"task_slug":"prediction","task_name":"Prediction"},{"task_slug":"time-series","task_name":"Time Series Analysis"},{"task_slug":"time-series-prediction","task_name":"Time Series Prediction"},{"task_slug":"traffic-prediction","task_name":"Traffic Prediction"}],"methods":[{"method_slug":"graph-neural-network","method_name":"Graph Neural Network"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/traffic-prediction-on-pems04","task":"Traffic Prediction","dataset":"PeMS04","model":"PDFormer","rank_in_archive_order":7,"of":12,"metrics":{"12 Steps MAE":"18.32"},"uses_additional_data":true},{"leaderboard":"/sota/traffic-prediction-on-pems07","task":"Traffic Prediction","dataset":"PeMS07","model":"PDFormer","rank_in_archive_order":10,"of":17,"metrics":{"MAE@1h":"19.83"},"uses_additional_data":false},{"leaderboard":"/sota/traffic-prediction-on-pems08","task":"Traffic Prediction","dataset":"PeMS08","model":"PDFormer","rank_in_archive_order":8,"of":13,"metrics":{"MAE@1h":"13.58"},"uses_additional_data":false},{"leaderboard":"/sota/traffic-prediction-on-pemsd4","task":"Traffic Prediction","dataset":"PeMSD4","model":"PDFormer","rank_in_archive_order":5,"of":13,"metrics":{"12 steps MAE":"18.32"},"uses_additional_data":false},{"leaderboard":"/sota/traffic-prediction-on-pemsd7","task":"Traffic Prediction","dataset":"PeMSD7","model":"PDFormer","rank_in_archive_order":6,"of":8,"metrics":{"12 steps MAE":"19.832"},"uses_additional_data":false},{"leaderboard":"/sota/traffic-prediction-on-pemsd8","task":"Traffic Prediction","dataset":"PeMSD8","model":"PDFormer","rank_in_archive_order":7,"of":13,"metrics":{"12 steps MAE":"13.58"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2301.07945","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2301.07945"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/BUAABIGSCity/PDFormer","reach":null}],"summary":{"ran":6,"unverified":2},"by_repo_kind":{"official":{"samples":8,"ran":6,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"0e6afce580fb1502","entry":"AbstractModel","repo":"BUAABIGSCity/PDFormer","repo_kind":"official","path":"libcity/model/traffic_flow_prediction/PDFormer.py","file_url":"https://github.com/BUAABIGSCity/PDFormer/blob/HEAD/libcity/model/traffic_flow_prediction/PDFormer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0e6afce580fb1502"}},{"code_sha256_prefix":"6ba9f3eb4fae249f","entry":"AbstractTrafficStateModel","repo":"BUAABIGSCity/PDFormer","repo_kind":"official","path":"libcity/model/traffic_flow_prediction/PDFormer.py","file_url":"https://github.com/BUAABIGSCity/PDFormer/blob/HEAD/libcity/model/traffic_flow_prediction/PDFormer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6ba9f3eb4fae249f"}},{"code_sha256_prefix":"6f259d5e72269ce1","entry":"DataEmbedding","repo":"BUAABIGSCity/PDFormer","repo_kind":"official","path":"libcity/model/traffic_flow_prediction/PDFormer.py","file_url":"https://github.com/BUAABIGSCity/PDFormer/blob/HEAD/libcity/model/traffic_flow_prediction/PDFormer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6f259d5e72269ce1"}},{"code_sha256_prefix":"1a87dd511edbc83b","entry":"PositionalEncoding","repo":"BUAABIGSCity/PDFormer","repo_kind":"official","path":"libcity/model/traffic_flow_prediction/PDFormer.py","file_url":"https://github.com/BUAABIGSCity/PDFormer/blob/HEAD/libcity/model/traffic_flow_prediction/PDFormer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1a87dd511edbc83b"}},{"code_sha256_prefix":"cab1f3e5eb569e31","entry":"STSelfAttention","repo":"BUAABIGSCity/PDFormer","repo_kind":"official","path":"libcity/model/traffic_flow_prediction/PDFormer.py","file_url":"https://github.com/BUAABIGSCity/PDFormer/blob/HEAD/libcity/model/traffic_flow_prediction/PDFormer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cab1f3e5eb569e31"}},{"code_sha256_prefix":"77819d970a28b38d","entry":"TokenEmbedding","repo":"BUAABIGSCity/PDFormer","repo_kind":"official","path":"libcity/model/traffic_flow_prediction/PDFormer.py","file_url":"https://github.com/BUAABIGSCity/PDFormer/blob/HEAD/libcity/model/traffic_flow_prediction/PDFormer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"77819d970a28b38d"}},{"code_sha256_prefix":"767dff4849d872ef","entry":"PDFormer","repo":"BUAABIGSCity/PDFormer","repo_kind":"official","path":"libcity/model/traffic_flow_prediction/PDFormer.py","file_url":"https://github.com/BUAABIGSCity/PDFormer/blob/HEAD/libcity/model/traffic_flow_prediction/PDFormer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"767dff4849d872ef"}},{"code_sha256_prefix":"fcf9e522129aec3a","entry":"STEncoderBlock","repo":"BUAABIGSCity/PDFormer","repo_kind":"official","path":"libcity/model/traffic_flow_prediction/PDFormer.py","file_url":"https://github.com/BUAABIGSCity/PDFormer/blob/HEAD/libcity/model/traffic_flow_prediction/PDFormer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fcf9e522129aec3a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}