{"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/testam-a-time-enhanced-spatio-temporal","title":"TESTAM: A Time-Enhanced Spatio-Temporal Attention Model with Mixture of Experts","arxiv_id":"2403.02600","date":"2024-03-05","proceeding":null,"authors":["Hyunwook Lee","Sungahn Ko"],"abstract":"Accurate traffic forecasting is challenging due to the complex dependency on road networks, various types of roads, and the abrupt speed change due to the events. Recent works mainly focus on dynamic spatial modeling with adaptive graph embedding or graph attention having less consideration for temporal characteristics and in-situ modeling. In this paper, we propose a novel deep learning model named TESTAM, which individually models recurring and non-recurring traffic patterns by a mixture-of-experts model with three experts on temporal modeling, spatio-temporal modeling with static graph, and dynamic spatio-temporal dependency modeling with dynamic graph. By introducing different experts and properly routing them, TESTAM could better model various circumstances, including spatially isolated nodes, highly related nodes, and recurring and non-recurring events. For the proper routing, we reformulate a gating problem into a classification problem with pseudo labels. Experimental results on three public traffic network datasets, METR-LA, PEMS-BAY, and EXPY-TKY, demonstrate that TESTAM achieves a better indication and modeling of recurring and non-recurring traffic. We published the official code at https://github.com/HyunWookL/TESTAM","url_abs":"https://arxiv.org/abs/2403.02600v1","url_pdf":"https://arxiv.org/pdf/2403.02600v1.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":"testam-a-time-enhanced-spatio-temporal","repo_url":"https://github.com/hyunwookl/testam","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"graph-attention","task_name":"Graph Attention"},{"task_slug":"graph-embedding","task_name":"Graph Embedding"},{"task_slug":"mixture-of-experts","task_name":"Mixture-of-Experts"}],"methods":[{"method_slug":"focus","method_name":"Focus"},{"method_slug":"speed","method_name":"SPEED"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2403.02600","atlas_url":"https://app.syntology.ai/?focus=2403.02600","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.02600"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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":"deterministic:regex_extraction","url":"https://github.com/HyunWookL/TESTAM","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hyunwookl/testam","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_violates":2,"ran_draft_wrong":1,"unverified":1},"by_repo_kind":{"official":{"samples":4,"ran":3,"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":"901bedf723a6f00d","entry":"asym_adj","repo":"HyunWookL/TESTAM","repo_kind":"official","path":"util.py","file_url":"https://github.com/HyunWookL/TESTAM/blob/HEAD/util.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"901bedf723a6f00d"}},{"code_sha256_prefix":"e7b2e6a60daa42ca","entry":"calculate_normalized_laplacian","repo":"HyunWookL/TESTAM","repo_kind":"official","path":"util.py","file_url":"https://github.com/HyunWookL/TESTAM/blob/HEAD/util.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e7b2e6a60daa42ca"}},{"code_sha256_prefix":"9a7928795f74526c","entry":"sym_adj","repo":"HyunWookL/TESTAM","repo_kind":"official","path":"util.py","file_url":"https://github.com/HyunWookL/TESTAM/blob/HEAD/util.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9a7928795f74526c"}},{"code_sha256_prefix":"dd669f99f4fe7e0f","entry":"generate_graph_seq2seq_io_data","repo":"HyunWookL/TESTAM","repo_kind":"official","path":"generate_training_data.py","file_url":"https://github.com/HyunWookL/TESTAM/blob/HEAD/generate_training_data.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":"dd669f99f4fe7e0f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}