{"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/expressivity-of-graph-neural-networks-through","title":"Expressivity of Graph Neural Networks Through the Lens of Adversarial Robustness","arxiv_id":"2308.08173","date":"2023-08-16","proceeding":null,"authors":["Francesco Campi","Lukas Gosch","Tom Wollschläger","Yan Scholten","Stephan Günnemann"],"abstract":"We perform the first adversarial robustness study into Graph Neural Networks (GNNs) that are provably more powerful than traditional Message Passing Neural Networks (MPNNs). In particular, we use adversarial robustness as a tool to uncover a significant gap between their theoretically possible and empirically achieved expressive power. To do so, we focus on the ability of GNNs to count specific subgraph patterns, which is an established measure of expressivity, and extend the concept of adversarial robustness to this task. Based on this, we develop efficient adversarial attacks for subgraph counting and show that more powerful GNNs fail to generalize even to small perturbations to the graph's structure. Expanding on this, we show that such architectures also fail to count substructures on out-of-distribution graphs.","url_abs":"https://arxiv.org/abs/2308.08173v2","url_pdf":"https://arxiv.org/pdf/2308.08173v2.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":"expressivity-of-graph-neural-networks-through","repo_url":"https://github.com/francesco-campi/rob-subgraphs","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"adversarial-robustness","task_name":"Adversarial Robustness"},{"task_slug":"subgraph-counting","task_name":"Subgraph Counting"}],"methods":[{"method_slug":"focus","method_name":"Focus"},{"method_slug":"fail","method_name":"fail"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2308.08173","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2308.08173"}},"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/francesco-campi/Rob-Subgraphs","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/francesco-campi/rob-subgraphs","reach":{"status":"ok"}}],"summary":{"ran_honours":2,"ran_draft_wrong":2,"ran":3,"unverified":5},"by_repo_kind":{"official":{"samples":12,"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":12,"samples":[{"code_sha256_prefix":"a2e61cd3c32caa2f","entry":"evaluate_epoch","repo":"francesco-campi/Rob-Subgraphs","repo_kind":"official","path":"pipelines/GNN_train.py","file_url":"https://github.com/francesco-campi/Rob-Subgraphs/blob/HEAD/pipelines/GNN_train.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a2e61cd3c32caa2f"}},{"code_sha256_prefix":"cffde786f40d311f","entry":"evaluate_epoch_SAN","repo":"francesco-campi/Rob-Subgraphs","repo_kind":"official","path":"pipelines/GNN_train.py","file_url":"https://github.com/francesco-campi/Rob-Subgraphs/blob/HEAD/pipelines/GNN_train.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cffde786f40d311f"}},{"code_sha256_prefix":"f36fce9a4c6d8239","entry":"generate_dataset","repo":"francesco-campi/Rob-Subgraphs","repo_kind":"official","path":"pipelines/dataset_creation.py","file_url":"https://github.com/francesco-campi/Rob-Subgraphs/blob/HEAD/pipelines/dataset_creation.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f36fce9a4c6d8239"}},{"code_sha256_prefix":"002d22a70fccfbbf","entry":"generate_dataset_mix","repo":"francesco-campi/Rob-Subgraphs","repo_kind":"official","path":"pipelines/dataset_creation.py","file_url":"https://github.com/francesco-campi/Rob-Subgraphs/blob/HEAD/pipelines/dataset_creation.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"002d22a70fccfbbf"}},{"code_sha256_prefix":"e7a348cebe5d2fd3","entry":"generate_gnn_input","repo":"francesco-campi/rob-subgraphs","repo_kind":"official","path":"pipelines/adversarial_robustness.py","file_url":"https://github.com/francesco-campi/rob-subgraphs/blob/HEAD/pipelines/adversarial_robustness.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":"e7a348cebe5d2fd3"}},{"code_sha256_prefix":"700de849477f93ce","entry":"imp_exp_attn","repo":"francesco-campi/rob-subgraphs","repo_kind":"official","path":"src/SAN/graph_transformer_layer.py","file_url":"https://github.com/francesco-campi/rob-subgraphs/blob/HEAD/src/SAN/graph_transformer_layer.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":"700de849477f93ce"}},{"code_sha256_prefix":"a3fb87a259b15eae","entry":"scaling","repo":"francesco-campi/rob-subgraphs","repo_kind":"official","path":"src/SAN/graph_transformer_layer.py","file_url":"https://github.com/francesco-campi/rob-subgraphs/blob/HEAD/src/SAN/graph_transformer_layer.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":"a3fb87a259b15eae"}},{"code_sha256_prefix":"465d802548a63b62","entry":"add_edge_laplace_feats","repo":"francesco-campi/rob-subgraphs","repo_kind":"official","path":"src/SAN/SAN_dataset.py","file_url":"https://github.com/francesco-campi/rob-subgraphs/blob/HEAD/src/SAN/SAN_dataset.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":"465d802548a63b62"}},{"code_sha256_prefix":"d6cfd82366cf960d","entry":"create_subgraphs","repo":"francesco-campi/rob-subgraphs","repo_kind":"official","path":"src/I2GNN/utils.py","file_url":"https://github.com/francesco-campi/rob-subgraphs/blob/HEAD/src/I2GNN/utils.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":"d6cfd82366cf960d"}},{"code_sha256_prefix":"8dd808b1856f5968","entry":"create_subgraphs2","repo":"francesco-campi/rob-subgraphs","repo_kind":"official","path":"src/I2GNN/utils.py","file_url":"https://github.com/francesco-campi/rob-subgraphs/blob/HEAD/src/I2GNN/utils.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":"8dd808b1856f5968"}},{"code_sha256_prefix":"5eddec66681a8f7f","entry":"create_subgraphs3","repo":"francesco-campi/rob-subgraphs","repo_kind":"official","path":"src/I2GNN/utils.py","file_url":"https://github.com/francesco-campi/rob-subgraphs/blob/HEAD/src/I2GNN/utils.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":"5eddec66681a8f7f"}},{"code_sha256_prefix":"9408c2ca6e799410","entry":"src_dot_dst","repo":"francesco-campi/rob-subgraphs","repo_kind":"official","path":"src/SAN/graph_transformer_layer.py","file_url":"https://github.com/francesco-campi/rob-subgraphs/blob/HEAD/src/SAN/graph_transformer_layer.py","link_basis":"harvester_set","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":"9408c2ca6e799410"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}