{"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/spectral-invariant-learning-for-dynamic-1","title":"Spectral Invariant Learning for Dynamic Graphs under Distribution Shifts","arxiv_id":"2403.05026","date":"2024-03-08","proceeding":"NeurIPS 2023 11","authors":["Zeyang Zhang","Xin Wang","Ziwei Zhang","Zhou Qin","Weigao Wen","Hui Xue","Haoyang Li","Wenwu Zhu"],"abstract":"Dynamic graph neural networks (DyGNNs) currently struggle with handling distribution shifts that are inherent in dynamic graphs. Existing work on DyGNNs with out-of-distribution settings only focuses on the time domain, failing to handle cases involving distribution shifts in the spectral domain. In this paper, we discover that there exist cases with distribution shifts unobservable in the time domain while observable in the spectral domain, and propose to study distribution shifts on dynamic graphs in the spectral domain for the first time. However, this investigation poses two key challenges: i) it is non-trivial to capture different graph patterns that are driven by various frequency components entangled in the spectral domain; and ii) it remains unclear how to handle distribution shifts with the discovered spectral patterns. To address these challenges, we propose Spectral Invariant Learning for Dynamic Graphs under Distribution Shifts (SILD), which can handle distribution shifts on dynamic graphs by capturing and utilizing invariant and variant spectral patterns. Specifically, we first design a DyGNN with Fourier transform to obtain the ego-graph trajectory spectrums, allowing the mixed dynamic graph patterns to be transformed into separate frequency components. We then develop a disentangled spectrum mask to filter graph dynamics from various frequency components and discover the invariant and variant spectral patterns. Finally, we propose invariant spectral filtering, which encourages the model to rely on invariant patterns for generalization under distribution shifts. Experimental results on synthetic and real-world dynamic graph datasets demonstrate the superiority of our method for both node classification and link prediction tasks under distribution shifts.","url_abs":"https://arxiv.org/abs/2403.05026v1","url_pdf":"https://arxiv.org/pdf/2403.05026v1.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":"spectral-invariant-learning-for-dynamic-1","repo_url":"https://github.com/wondergo2017/sild","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"link-prediction","task_name":"Link Prediction"},{"task_slug":"node-classification","task_name":"Node Classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2403.05026","atlas_url":"https://app.syntology.ai/?focus=2403.05026","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.05026"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/wondergo2017/sild","reach":{"status":"ok"}}],"summary":{"ran":7,"unverified":1},"by_repo_kind":{"official":{"samples":8,"ran":7,"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":8,"samples":[{"code_sha256_prefix":"5bae103b0fece156","entry":"convert_size","repo":"wondergo2017/sild","repo_kind":"official","path":"sild/utils/misc.py","file_url":"https://github.com/wondergo2017/sild/blob/HEAD/sild/utils/misc.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":"5bae103b0fece156"}},{"code_sha256_prefix":"af00f5a224563094","entry":"convert_time","repo":"wondergo2017/sild","repo_kind":"official","path":"sild/utils/misc.py","file_url":"https://github.com/wondergo2017/sild/blob/HEAD/sild/utils/misc.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":"af00f5a224563094"}},{"code_sha256_prefix":"520dfca725ed1118","entry":"mkdirs","repo":"wondergo2017/sild","repo_kind":"official","path":"sild/utils/data_util.py","file_url":"https://github.com/wondergo2017/sild/blob/HEAD/sild/utils/data_util.py","link_basis":"harvester_set","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":"520dfca725ed1118"}},{"code_sha256_prefix":"060b44f5278742c2","entry":"prepare_dir","repo":"wondergo2017/sild","repo_kind":"official","path":"sild/utils/data_util.py","file_url":"https://github.com/wondergo2017/sild/blob/HEAD/sild/utils/data_util.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":"060b44f5278742c2"}},{"code_sha256_prefix":"7187eb430177392f","entry":"select_by_field","repo":"wondergo2017/sild","repo_kind":"official","path":"DIDA/DIDA/utils/data_util.py","file_url":"https://github.com/wondergo2017/sild/blob/HEAD/DIDA/DIDA/utils/data_util.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":"7187eb430177392f"}},{"code_sha256_prefix":"5e4e8d3f54d33bac","entry":"timing","repo":"wondergo2017/sild","repo_kind":"official","path":"sild/utils/misc.py","file_url":"https://github.com/wondergo2017/sild/blob/HEAD/sild/utils/misc.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":"5e4e8d3f54d33bac"}},{"code_sha256_prefix":"072c717f02e44012","entry":"xavier_init","repo":"wondergo2017/sild","repo_kind":"official","path":"DIDA/DIDA/utils/inits.py","file_url":"https://github.com/wondergo2017/sild/blob/HEAD/DIDA/DIDA/utils/inits.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":"072c717f02e44012"}},{"code_sha256_prefix":"8fca4741f029cd21","entry":"mp_exec","repo":"wondergo2017/sild","repo_kind":"official","path":"DIDA/DIDA/utils/mp.py","file_url":"https://github.com/wondergo2017/sild/blob/HEAD/DIDA/DIDA/utils/mp.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":"8fca4741f029cd21"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}