{"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/polyformer-scalable-node-wise-filters-via","title":"PolyFormer: Scalable Node-wise Filters via Polynomial Graph Transformer","arxiv_id":"2407.14459","date":"2024-07-19","proceeding":null,"authors":["Jiahong Ma","Mingguo He","Zhewei Wei"],"abstract":"Spectral Graph Neural Networks have demonstrated superior performance in graph representation learning. However, many current methods focus on employing shared polynomial coefficients for all nodes, i.e., learning node-unified filters, which limits the filters' flexibility for node-level tasks. The recent DSF attempts to overcome this limitation by learning node-wise coefficients based on positional encoding. However, the initialization and updating process of the positional encoding are burdensome, hindering scalability on large-scale graphs. In this work, we propose a scalable node-wise filter, PolyAttn. Leveraging the attention mechanism, PolyAttn can directly learn node-wise filters in an efficient manner, offering powerful representation capabilities. Building on PolyAttn, we introduce the whole model, named PolyFormer. In the lens of Graph Transformer models, PolyFormer, which calculates attention scores within nodes, shows great scalability. Moreover, the model captures spectral information, enhancing expressiveness while maintaining efficiency. With these advantages, PolyFormer offers a desirable balance between scalability and expressiveness for node-level tasks. Extensive experiments demonstrate that our proposed methods excel at learning arbitrary node-wise filters, showing superior performance on both homophilic and heterophilic graphs, and handling graphs containing up to 100 million nodes. The code is available at https://github.com/air029/PolyFormer.","url_abs":"https://arxiv.org/abs/2407.14459v1","url_pdf":"https://arxiv.org/pdf/2407.14459v1.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":"polyformer-scalable-node-wise-filters-via","repo_url":"https://github.com/air029/polyformer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"graph-representation-learning","task_name":"Graph Representation Learning"},{"task_slug":"representation-learning","task_name":"Representation Learning"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"focus","method_name":"Focus"},{"method_slug":"graph-transformer","method_name":"Graph Transformer"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"lapeigen","method_name":"LapEigen"},{"method_slug":"laplacian-pe","method_name":"Laplacian PE"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2407.14459","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2407.14459"}},"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/air029/polyformer","reach":{"status":"ok"}}],"summary":{"ran":7,"ran_honours":1,"ran_draft_wrong":2,"unverified":4},"by_repo_kind":{"official":{"samples":14,"ran":10,"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":14,"samples":[{"code_sha256_prefix":"5842468b7170d5c1","entry":"accuracy","repo":"air029/polyformer","repo_kind":"official","path":"node_classification_large_graph/training_batch.py","file_url":"https://github.com/air029/polyformer/blob/HEAD/node_classification_large_graph/training_batch.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":"5842468b7170d5c1"}},{"code_sha256_prefix":"d7653b0093307e2d","entry":"cheby","repo":"air029/polyformer","repo_kind":"official","path":"node_classification/utils.py","file_url":"https://github.com/air029/polyformer/blob/HEAD/node_classification/utils.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d7653b0093307e2d"}},{"code_sha256_prefix":"60fa16c14dfd02f0","entry":"even_quantile_labels","repo":"air029/polyformer","repo_kind":"official","path":"node_classification_large_graph/dataloader/LINKX_dataset.py","file_url":"https://github.com/air029/polyformer/blob/HEAD/node_classification_large_graph/dataloader/LINKX_dataset.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":"60fa16c14dfd02f0"}},{"code_sha256_prefix":"015b48620e1b8319","entry":"index_to_mask","repo":"air029/polyformer","repo_kind":"official","path":"node_classification/utils.py","file_url":"https://github.com/air029/polyformer/blob/HEAD/node_classification/utils.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":"015b48620e1b8319"}},{"code_sha256_prefix":"8e507f8a537044ad","entry":"load_twitch","repo":"air029/polyformer","repo_kind":"official","path":"node_classification_large_graph/dataloader/LINKX_dataset.py","file_url":"https://github.com/air029/polyformer/blob/HEAD/node_classification_large_graph/dataloader/LINKX_dataset.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":"8e507f8a537044ad"}},{"code_sha256_prefix":"d4e6fd9f6cd8a3ad","entry":"load_twitch_gamer","repo":"air029/polyformer","repo_kind":"official","path":"node_classification_large_graph/dataloader/LINKX_dataset.py","file_url":"https://github.com/air029/polyformer/blob/HEAD/node_classification_large_graph/dataloader/LINKX_dataset.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d4e6fd9f6cd8a3ad"}},{"code_sha256_prefix":"c97b99c4e8201a97","entry":"sparse_mx_to_torch_sparse_tensor","repo":"air029/polyformer","repo_kind":"official","path":"node_classification_large_graph/processing_dataset.py","file_url":"https://github.com/air029/polyformer/blob/HEAD/node_classification_large_graph/processing_dataset.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c97b99c4e8201a97"}},{"code_sha256_prefix":"adcee8aadfbcc909","entry":"sys_normalized_adjacency","repo":"air029/polyformer","repo_kind":"official","path":"node_classification_large_graph/processing_dataset.py","file_url":"https://github.com/air029/polyformer/blob/HEAD/node_classification_large_graph/processing_dataset.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":"adcee8aadfbcc909"}},{"code_sha256_prefix":"b6d88af9096c2c9a","entry":"sys_normalized_adjacency_i","repo":"air029/polyformer","repo_kind":"official","path":"node_classification_large_graph/processing_dataset.py","file_url":"https://github.com/air029/polyformer/blob/HEAD/node_classification_large_graph/processing_dataset.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":"b6d88af9096c2c9a"}},{"code_sha256_prefix":"54cc1bc4ace00fb7","entry":"take_rest","repo":"air029/polyformer","repo_kind":"official","path":"node_classification/utils.py","file_url":"https://github.com/air029/polyformer/blob/HEAD/node_classification/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":"54cc1bc4ace00fb7"}},{"code_sha256_prefix":"f36c10b62c48e05e","entry":"DataLoader","repo":"air029/polyformer","repo_kind":"official","path":"node_classification/dataloader/dataset_loader.py","file_url":"https://github.com/air029/polyformer/blob/HEAD/node_classification/dataloader/dataset_loader.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":"f36c10b62c48e05e"}},{"code_sha256_prefix":"3e9e130cf0f52cb4","entry":"DataLoader","repo":"air029/polyformer","repo_kind":"official","path":"node_classification_large_graph/dataloader/dataset_loader.py","file_url":"https://github.com/air029/polyformer/blob/HEAD/node_classification_large_graph/dataloader/dataset_loader.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":"3e9e130cf0f52cb4"}},{"code_sha256_prefix":"c92a4ce1dc31074e","entry":"create_batch","repo":"air029/polyformer","repo_kind":"official","path":"node_classification_large_graph/training_batch.py","file_url":"https://github.com/air029/polyformer/blob/HEAD/node_classification_large_graph/training_batch.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":"c92a4ce1dc31074e"}},{"code_sha256_prefix":"b756e3430fe59b3a","entry":"train","repo":"air029/polyformer","repo_kind":"official","path":"node_classification_large_graph/training_batch.py","file_url":"https://github.com/air029/polyformer/blob/HEAD/node_classification_large_graph/training_batch.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":"b756e3430fe59b3a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}