{"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/multi-scale-traffic-pattern-bank-for-cross","title":"Multi-scale Traffic Pattern Bank for Cross-city Few-shot Traffic Forecasting","arxiv_id":"2402.00397","date":"2024-02-01","proceeding":null,"authors":["Zhanyu Liu","Guanjie Zheng","Yanwei Yu"],"abstract":"Traffic forecasting is crucial for intelligent transportation systems (ITS), aiding in efficient resource allocation and effective traffic control. However, its effectiveness often relies heavily on abundant traffic data, while many cities lack sufficient data due to limited device support, posing a significant challenge for traffic forecasting. Recognizing this challenge, we have made a noteworthy observation: traffic patterns exhibit similarities across diverse cities. Building on this key insight, we propose a solution for the cross-city few-shot traffic forecasting problem called Multi-scale Traffic Pattern Bank (MTPB). Primarily, MTPB initiates its learning process by leveraging data-rich source cities, effectively acquiring comprehensive traffic knowledge through a spatial-temporal-aware pre-training process. Subsequently, the framework employs advanced clustering techniques to systematically generate a multi-scale traffic pattern bank derived from the learned knowledge. Next, the traffic data of the data-scarce target city could query the traffic pattern bank, facilitating the aggregation of meta-knowledge. This meta-knowledge, in turn, assumes a pivotal role as a robust guide in subsequent processes involving graph reconstruction and forecasting. Empirical assessments conducted on real-world traffic datasets affirm the superior performance of MTPB, surpassing existing methods across various categories and exhibiting numerous attributes conducive to the advancement of cross-city few-shot forecasting methodologies. The code is available in https://github.com/zhyliu00/MTPB.","url_abs":"https://arxiv.org/abs/2402.00397v2","url_pdf":"https://arxiv.org/pdf/2402.00397v2.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":"multi-scale-traffic-pattern-bank-for-cross","repo_url":"https://github.com/zhyliu00/mtpb","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"graph-reconstruction","task_name":"Graph Reconstruction"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.00397","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.00397"}},"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/zhyliu00/mtpb","reach":{"status":"ok"}}],"summary":{"ran":2,"unverified":4},"by_repo_kind":{"official":{"samples":6,"ran":2,"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":6,"samples":[{"code_sha256_prefix":"bc9550e57ffa3e81","entry":"get_data_list","repo":"zhyliu00/mtpb","repo_kind":"official","path":"utils.py","file_url":"https://github.com/zhyliu00/mtpb/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bc9550e57ffa3e81"}},{"code_sha256_prefix":"e5b3304974a09d99","entry":"unshuffle","repo":"zhyliu00/mtpb","repo_kind":"official","path":"model/TSFormer/TSmodel.py","file_url":"https://github.com/zhyliu00/mtpb/blob/HEAD/model/TSFormer/TSmodel.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e5b3304974a09d99"}},{"code_sha256_prefix":"a39b607775d33946","entry":"load_pickle","repo":"zhyliu00/mtpb","repo_kind":"official","path":"utils.py","file_url":"https://github.com/zhyliu00/mtpb/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a39b607775d33946"}},{"code_sha256_prefix":"ebaa8b93ad440e45","entry":"set_seed","repo":"zhyliu00/mtpb","repo_kind":"official","path":"utils.py","file_url":"https://github.com/zhyliu00/mtpb/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ebaa8b93ad440e45"}},{"code_sha256_prefix":"9f831f20d2bd7f32","entry":"test_batch","repo":"zhyliu00/mtpb","repo_kind":"official","path":"pretrain.py","file_url":"https://github.com/zhyliu00/mtpb/blob/HEAD/pretrain.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9f831f20d2bd7f32"}},{"code_sha256_prefix":"12c9df8e41b3d3e2","entry":"train_batch","repo":"zhyliu00/mtpb","repo_kind":"official","path":"pretrain.py","file_url":"https://github.com/zhyliu00/mtpb/blob/HEAD/pretrain.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"12c9df8e41b3d3e2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}