{"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/specformer-spectral-graph-neural-networks","title":"Specformer: Spectral Graph Neural Networks Meet Transformers","arxiv_id":"2303.01028","date":"2023-03-02","proceeding":null,"authors":["Deyu Bo","Chuan Shi","Lele Wang","Renjie Liao"],"abstract":"Spectral graph neural networks (GNNs) learn graph representations via spectral-domain graph convolutions. However, most existing spectral graph filters are scalar-to-scalar functions, i.e., mapping a single eigenvalue to a single filtered value, thus ignoring the global pattern of the spectrum. Furthermore, these filters are often constructed based on some fixed-order polynomials, which have limited expressiveness and flexibility. To tackle these issues, we introduce Specformer, which effectively encodes the set of all eigenvalues and performs self-attention in the spectral domain, leading to a learnable set-to-set spectral filter. We also design a decoder with learnable bases to enable non-local graph convolution. Importantly, Specformer is equivariant to permutation. By stacking multiple Specformer layers, one can build a powerful spectral GNN. On synthetic datasets, we show that our Specformer can better recover ground-truth spectral filters than other spectral GNNs. Extensive experiments of both node-level and graph-level tasks on real-world graph datasets show that our Specformer outperforms state-of-the-art GNNs and learns meaningful spectrum patterns. Code and data are available at https://github.com/bdy9527/Specformer.","url_abs":"https://arxiv.org/abs/2303.01028v1","url_pdf":"https://arxiv.org/pdf/2303.01028v1.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":"specformer-spectral-graph-neural-networks","repo_url":"https://github.com/bdy9527/specformer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"GPL-3.0"}}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2303.01028","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2303.01028"}},"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":"deterministic:regex_extraction","url":"https://github.com/bdy9527/Specformer","reach":{"status":"ok","spdx":"GPL-3.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/bdy9527/specformer","reach":{"status":"ok","spdx":"GPL-3.0"}}],"summary":{"ran_honours":4,"ran_fixture":1},"by_repo_kind":{"community":{"samples":4,"ran":4,"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":5,"samples":[{"code_sha256_prefix":"f6b944f50d3f15ae","entry":"count_parameters","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"f6b944f50d3f15ae"}},{"code_sha256_prefix":"d69f3e86e6ba2faf","entry":"eigen_decompositon","repo":"DSL-Lab/Specformer","repo_kind":"community","path":"Node/preprocess_node_data.py","file_url":"https://github.com/DSL-Lab/Specformer/blob/HEAD/Node/preprocess_node_data.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"d69f3e86e6ba2faf"}},{"code_sha256_prefix":"09db41041e34432f","entry":"eval_epoch","repo":"DSL-Lab/Specformer","repo_kind":"community","path":"Graph/dgl_main.py","file_url":"https://github.com/DSL-Lab/Specformer/blob/HEAD/Graph/dgl_main.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"09db41041e34432f"}},{"code_sha256_prefix":"479f8f95651c04ac","entry":"normalize_graph","repo":"DSL-Lab/Specformer","repo_kind":"community","path":"Node/preprocess_node_data.py","file_url":"https://github.com/DSL-Lab/Specformer/blob/HEAD/Node/preprocess_node_data.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"479f8f95651c04ac"}},{"code_sha256_prefix":"c1d6392f89c5e495","entry":"parse_index_file","repo":"DSL-Lab/Specformer","repo_kind":"community","path":"Node/preprocess_node_data.py","file_url":"https://github.com/DSL-Lab/Specformer/blob/HEAD/Node/preprocess_node_data.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"c1d6392f89c5e495"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}