{"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/a-simple-and-yet-fairly-effective-defense-for","title":"A Simple and Yet Fairly Effective Defense for Graph Neural Networks","arxiv_id":"2402.13987","date":"2024-02-21","proceeding":null,"authors":["Sofiane Ennadir","Yassine Abbahaddou","Johannes F. Lutzeyer","Michalis Vazirgiannis","Henrik Boström"],"abstract":"Graph Neural Networks (GNNs) have emerged as the dominant approach for machine learning on graph-structured data. However, concerns have arisen regarding the vulnerability of GNNs to small adversarial perturbations. Existing defense methods against such perturbations suffer from high time complexity and can negatively impact the model's performance on clean graphs. To address these challenges, this paper introduces NoisyGNNs, a novel defense method that incorporates noise into the underlying model's architecture. We establish a theoretical connection between noise injection and the enhancement of GNN robustness, highlighting the effectiveness of our approach. We further conduct extensive empirical evaluations on the node classification task to validate our theoretical findings, focusing on two popular GNNs: the GCN and GIN. The results demonstrate that NoisyGNN achieves superior or comparable defense performance to existing methods while minimizing added time complexity. The NoisyGNN approach is model-agnostic, allowing it to be integrated with different GNN architectures. Successful combinations of our NoisyGNN approach with existing defense techniques demonstrate even further improved adversarial defense results. Our code is publicly available at: https://github.com/Sennadir/NoisyGNN.","url_abs":"https://arxiv.org/abs/2402.13987v1","url_pdf":"https://arxiv.org/pdf/2402.13987v1.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":"a-simple-and-yet-fairly-effective-defense-for","repo_url":"https://github.com/sennadir/noisygnn","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"adversarial-defense","task_name":"Adversarial Defense"},{"task_slug":"node-classification","task_name":"Node Classification"}],"methods":[{"method_slug":"gcn","method_name":"GCN"},{"method_slug":"gin","method_name":"GIN"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2402.13987","atlas_url":"https://app.syntology.ai/?focus=2402.13987","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.13987"}},"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/sennadir/noisygnn","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/Sennadir/NoisyGNN","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":1,"unverified":2},"by_repo_kind":{"official":{"samples":3,"ran":1,"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":"8ce9e8058b76b41f","entry":"accuracy_1","repo":"Sennadir/NoisyGNN","repo_kind":"official","path":"deeprobust/defense/basicfunction.py","file_url":"https://github.com/Sennadir/NoisyGNN/blob/HEAD/deeprobust/defense/basicfunction.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8ce9e8058b76b41f"}},{"code_sha256_prefix":"8f5bcbd4c4f6ecd9","entry":"att_coef","repo":"Sennadir/NoisyGNN","repo_kind":"official","path":"deeprobust/defense/basicfunction.py","file_url":"https://github.com/Sennadir/NoisyGNN/blob/HEAD/deeprobust/defense/basicfunction.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":"8f5bcbd4c4f6ecd9"}},{"code_sha256_prefix":"e34e3251fe5a61fd","entry":"drop_dissimilar_edges","repo":"Sennadir/NoisyGNN","repo_kind":"official","path":"deeprobust/defense/basicfunction.py","file_url":"https://github.com/Sennadir/NoisyGNN/blob/HEAD/deeprobust/defense/basicfunction.py","link_basis":"plan_row","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":"e34e3251fe5a61fd"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}