{"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/distinguished-in-uniform-self-attention-vs","title":"Distinguished In Uniform: Self Attention Vs. Virtual Nodes","arxiv_id":"2405.11951","date":"2024-05-20","proceeding":null,"authors":["Eran Rosenbluth","Jan Tönshoff","Martin Ritzert","Berke Kisin","Martin Grohe"],"abstract":"Graph Transformers (GTs) such as SAN and GPS are graph processing models that combine Message-Passing GNNs (MPGNNs) with global Self-Attention. They were shown to be universal function approximators, with two reservations: 1. The initial node features must be augmented with certain positional encodings. 2. The approximation is non-uniform: Graphs of different sizes may require a different approximating network. We first clarify that this form of universality is not unique to GTs: Using the same positional encodings, also pure MPGNNs and even 2-layer MLPs are non-uniform universal approximators. We then consider uniform expressivity: The target function is to be approximated by a single network for graphs of all sizes. There, we compare GTs to the more efficient MPGNN + Virtual Node architecture. The essential difference between the two model definitions is in their global computation method -- Self-Attention Vs Virtual Node. We prove that none of the models is a uniform-universal approximator, before proving our main result: Neither model's uniform expressivity subsumes the other's. We demonstrate the theory with experiments on synthetic data. We further augment our study with real-world datasets, observing mixed results which indicate no clear ranking in practice as well.","url_abs":"https://arxiv.org/abs/2405.11951v1","url_pdf":"https://arxiv.org/pdf/2405.11951v1.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":"distinguished-in-uniform-self-attention-vs","repo_url":"https://github.com/toenshoff/vn-vs-gt","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[{"method_slug":"gps","method_name":"GPS"},{"method_slug":"gts","method_name":"GTS"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2405.11951","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.11951"}},"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/toenshoff/vn-vs-gt","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":2,"unverified":6},"by_repo_kind":{"official":{"samples":8,"ran":2,"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":"1bb331bf70a78136","entry":"get_final_pretrained_ckpt","repo":"toenshoff/vn-vs-gt","repo_kind":"official","path":"graphgps/finetuning.py","file_url":"https://github.com/toenshoff/vn-vs-gt/blob/HEAD/graphgps/finetuning.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1bb331bf70a78136"}},{"code_sha256_prefix":"585566394225e457","entry":"new_optimizer_config","repo":"toenshoff/vn-vs-gt","repo_kind":"official","path":"custom_test_cor44.py","file_url":"https://github.com/toenshoff/vn-vs-gt/blob/HEAD/custom_test_cor44.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"585566394225e457"}},{"code_sha256_prefix":"ae56bcfaae96da3c","entry":"apply_chunking_to_forward","repo":"toenshoff/vn-vs-gt","repo_kind":"official","path":"graphgps/layer/bigbird_layer.py","file_url":"https://github.com/toenshoff/vn-vs-gt/blob/HEAD/graphgps/layer/bigbird_layer.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":"ae56bcfaae96da3c"}},{"code_sha256_prefix":"3db4474abe13fdee","entry":"init_model_from_pretrained","repo":"toenshoff/vn-vs-gt","repo_kind":"official","path":"graphgps/finetuning.py","file_url":"https://github.com/toenshoff/vn-vs-gt/blob/HEAD/graphgps/finetuning.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":"3db4474abe13fdee"}},{"code_sha256_prefix":"c98a702be0660ac9","entry":"is_seed","repo":"toenshoff/vn-vs-gt","repo_kind":"official","path":"graphgps/agg_runs.py","file_url":"https://github.com/toenshoff/vn-vs-gt/blob/HEAD/graphgps/agg_runs.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":"c98a702be0660ac9"}},{"code_sha256_prefix":"438635c08adfe2aa","entry":"is_split","repo":"toenshoff/vn-vs-gt","repo_kind":"official","path":"graphgps/agg_runs.py","file_url":"https://github.com/toenshoff/vn-vs-gt/blob/HEAD/graphgps/agg_runs.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":"438635c08adfe2aa"}},{"code_sha256_prefix":"40e98e1ecbf39f34","entry":"join_list","repo":"toenshoff/vn-vs-gt","repo_kind":"official","path":"graphgps/agg_runs.py","file_url":"https://github.com/toenshoff/vn-vs-gt/blob/HEAD/graphgps/agg_runs.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":"40e98e1ecbf39f34"}},{"code_sha256_prefix":"1fb967a375dcb16c","entry":"load_pretrained_model_cfg","repo":"toenshoff/vn-vs-gt","repo_kind":"official","path":"graphgps/finetuning.py","file_url":"https://github.com/toenshoff/vn-vs-gt/blob/HEAD/graphgps/finetuning.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":"1fb967a375dcb16c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}