{"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/towards-spatio-temporal-aware-traffic-time","title":"Towards Spatio-Temporal Aware Traffic Time Series Forecasting--Full Version","arxiv_id":"2203.15737","date":"2022-03-29","proceeding":null,"authors":["Razvan-Gabriel Cirstea","Bin Yang","Chenjuan Guo","Tung Kieu","Shirui Pan"],"abstract":"Traffic time series forecasting is challenging due to complex spatio-temporal dynamics time series from different locations often have distinct patterns; and for the same time series, patterns may vary across time, where, for example, there exist certain periods across a day showing stronger temporal correlations. Although recent forecasting models, in particular deep learning based models, show promising results, they suffer from being spatio-temporal agnostic. Such spatio-temporal agnostic models employ a shared parameter space irrespective of the time series locations and the time periods and they assume that the temporal patterns are similar across locations and do not evolve across time, which may not always hold, thus leading to sub-optimal results. In this work, we propose a framework that aims at turning spatio-temporal agnostic models to spatio-temporal aware models. To do so, we encode time series from different locations into stochastic variables, from which we generate location-specific and time-varying model parameters to better capture the spatio-temporal dynamics. We show how to integrate the framework with canonical attentions to enable spatio-temporal aware attentions. Next, to compensate for the additional overhead introduced by the spatio-temporal aware model parameter generation process, we propose a novel window attention scheme, which helps reduce the complexity from quadratic to linear, making spatio-temporal aware attentions also have competitive efficiency. We show strong empirical evidence on four traffic time series datasets, where the proposed spatio-temporal aware attentions outperform state-of-the-art methods in term of accuracy and efficiency. This is an extended version of \"Towards Spatio-Temporal Aware Traffic Time Series Forecasting\", to appear in ICDE 2022 [1], including additional experimental results.","url_abs":"https://arxiv.org/abs/2203.15737v3","url_pdf":"https://arxiv.org/pdf/2203.15737v3.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":"towards-spatio-temporal-aware-traffic-time","repo_url":"https://github.com/razvanc92/st-wa","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series","task_name":"Time Series Analysis"},{"task_slug":"time-series-forecasting","task_name":"Time Series Forecasting"}],"methods":[{"method_slug":"aware","method_name":"AWARE"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2203.15737","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.15737"}},"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/razvanc92/st-wa","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":1,"unverified":6},"by_repo_kind":{"official":{"samples":7,"ran":1,"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":"bb1134c39c66c490","entry":"MSE_torch","repo":"razvanc92/st-wa","repo_kind":"official","path":"componenets/metrics.py","file_url":"https://github.com/razvanc92/st-wa/blob/HEAD/componenets/metrics.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bb1134c39c66c490"}},{"code_sha256_prefix":"be27678f7901f1dc","entry":"Add_Window_Horizon","repo":"razvanc92/st-wa","repo_kind":"official","path":"util.py","file_url":"https://github.com/razvanc92/st-wa/blob/HEAD/util.py","link_basis":"harvester_set","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":"be27678f7901f1dc"}},{"code_sha256_prefix":"2d4043d05780769f","entry":"MAE_torch","repo":"razvanc92/st-wa","repo_kind":"official","path":"componenets/metrics.py","file_url":"https://github.com/razvanc92/st-wa/blob/HEAD/componenets/metrics.py","link_basis":"harvester_set","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":"2d4043d05780769f"}},{"code_sha256_prefix":"dadeb499af3778ba","entry":"RMSE_torch","repo":"razvanc92/st-wa","repo_kind":"official","path":"componenets/metrics.py","file_url":"https://github.com/razvanc92/st-wa/blob/HEAD/componenets/metrics.py","link_basis":"harvester_set","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":"dadeb499af3778ba"}},{"code_sha256_prefix":"e3ae9d75c9f42310","entry":"load_st_dataset","repo":"razvanc92/st-wa","repo_kind":"official","path":"util.py","file_url":"https://github.com/razvanc92/st-wa/blob/HEAD/util.py","link_basis":"harvester_set","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":"e3ae9d75c9f42310"}},{"code_sha256_prefix":"0ef827883d7bf3e6","entry":"minmax_by_column","repo":"razvanc92/st-wa","repo_kind":"official","path":"componenets/normalization.py","file_url":"https://github.com/razvanc92/st-wa/blob/HEAD/componenets/normalization.py","link_basis":"harvester_set","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":"0ef827883d7bf3e6"}},{"code_sha256_prefix":"132385707ec527a2","entry":"one_hot_by_column","repo":"razvanc92/st-wa","repo_kind":"official","path":"componenets/normalization.py","file_url":"https://github.com/razvanc92/st-wa/blob/HEAD/componenets/normalization.py","link_basis":"harvester_set","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":"132385707ec527a2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}