{"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/arxiv-2601-17130","title":"Impact of Graph Structure on Membership-Inference Risk for Graph Neural Networks","arxiv_id":"2601.17130","date":"2026-01-23","proceeding":null,"authors":["Megha Khosla"],"abstract":"Graph neural networks (GNNs) are widely used for tasks such as node classification and link prediction, but their use in sensitive settings raises concerns about training-data leakage. Prior work on privacy leakage in GNNs largely borrows assumptions from non-graph domains, overlooking the role of graph structure. We argue for a graph-specific analysis of privacy risk and study how graph structure affects node-level membership inference. We formalize membership inference (MI) over node-neighborhood tuples and investigate two important dimensions: (i) training-graph construction and (ii) inference-time edge access. We compare snowball sampling, a structure-aware procedure, with uniform random node sampling for constructing training graphs. Our experiments show that snowball sampling often hurts generalization relative to random sampling due to its coverage bias. In contrast, allowing access to inter-train-test edges at inference improves test accuracy, reduces the train-test gap, while also having a strong and setting-dependent effect on membership advantage. These results show that graph structure directly shapes privacy risk. We further show that the generalization gap, measured as the performance difference between training and test nodes, is an incomplete proxy for membership inference risk: membership advantage can rise or fall independently of changes in this gap, with inference-time edge access often playing a crucial role. Theoretically, we show that for node-level tasks, standard privacy-auditing results based on membership inference do not directly carry over to inductive graph settings, because training and test nodes are structurally dependent rather than interchangeable. We release the code and data at https://github.com/PriXAI/GraphStructurePrivacyAnalysis-public.","url_abs":"https://arxiv.org/abs/2601.17130","url_pdf":"https://arxiv.org/pdf/2601.17130","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2601.17130","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2601.17130"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/PriXAI/GraphStructurePrivacyAnalysis-public","reach":null}],"summary":{"unverified":13},"by_repo_kind":{"found_in_text":{"samples":13,"ran":0,"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":"f1cf2b8e0ea7642d","entry":"compute_loss_without_edges","repo":"PriXAI/GraphStructurePrivacyAnalysis-public","repo_kind":"found_in_text","path":"training/evaluate.py","file_url":"https://github.com/PriXAI/GraphStructurePrivacyAnalysis-public/blob/HEAD/training/evaluate.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":"f1cf2b8e0ea7642d"}},{"code_sha256_prefix":"f8860bbe8bb44323","entry":"compute_posterior","repo":"PriXAI/GraphStructurePrivacyAnalysis-public","repo_kind":"found_in_text","path":"attacks/attack_utils.py","file_url":"https://github.com/PriXAI/GraphStructurePrivacyAnalysis-public/blob/HEAD/attacks/attack_utils.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":"f8860bbe8bb44323"}},{"code_sha256_prefix":"22acbf2e6d1f09cd","entry":"compute_posterior_inductive","repo":"PriXAI/GraphStructurePrivacyAnalysis-public","repo_kind":"found_in_text","path":"attacks/attack_utils.py","file_url":"https://github.com/PriXAI/GraphStructurePrivacyAnalysis-public/blob/HEAD/attacks/attack_utils.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":"22acbf2e6d1f09cd"}},{"code_sha256_prefix":"4317280625a7b5c7","entry":"compute_posterior_without_edges","repo":"PriXAI/GraphStructurePrivacyAnalysis-public","repo_kind":"found_in_text","path":"training/evaluate.py","file_url":"https://github.com/PriXAI/GraphStructurePrivacyAnalysis-public/blob/HEAD/training/evaluate.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":"4317280625a7b5c7"}},{"code_sha256_prefix":"d94e118cfe33cca4","entry":"execute_function_by_name","repo":"PriXAI/GraphStructurePrivacyAnalysis-public","repo_kind":"found_in_text","path":"models/model.py","file_url":"https://github.com/PriXAI/GraphStructurePrivacyAnalysis-public/blob/HEAD/models/model.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":"d94e118cfe33cca4"}},{"code_sha256_prefix":"2162aad8111e07c7","entry":"get_posterior","repo":"PriXAI/GraphStructurePrivacyAnalysis-public","repo_kind":"found_in_text","path":"training/evaluate.py","file_url":"https://github.com/PriXAI/GraphStructurePrivacyAnalysis-public/blob/HEAD/training/evaluate.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":"2162aad8111e07c7"}},{"code_sha256_prefix":"155f827299ef5169","entry":"load_dataset","repo":"PriXAI/GraphStructurePrivacyAnalysis-public","repo_kind":"found_in_text","path":"utils/data_utils.py","file_url":"https://github.com/PriXAI/GraphStructurePrivacyAnalysis-public/blob/HEAD/utils/data_utils.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":"155f827299ef5169"}},{"code_sha256_prefix":"43918dd4fc77b97d","entry":"load_splits","repo":"PriXAI/GraphStructurePrivacyAnalysis-public","repo_kind":"found_in_text","path":"attacks/attack_utils.py","file_url":"https://github.com/PriXAI/GraphStructurePrivacyAnalysis-public/blob/HEAD/attacks/attack_utils.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":"43918dd4fc77b97d"}},{"code_sha256_prefix":"c95cf3f8fc78a597","entry":"normalize_bool","repo":"PriXAI/GraphStructurePrivacyAnalysis-public","repo_kind":"found_in_text","path":"utils/plot_3panel_attack_test_sizes.py","file_url":"https://github.com/PriXAI/GraphStructurePrivacyAnalysis-public/blob/HEAD/utils/plot_3panel_attack_test_sizes.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":"c95cf3f8fc78a597"}},{"code_sha256_prefix":"8d7535d6176fe33f","entry":"normalize_model_name","repo":"PriXAI/GraphStructurePrivacyAnalysis-public","repo_kind":"found_in_text","path":"utils/plot_3panel_attack_test_sizes.py","file_url":"https://github.com/PriXAI/GraphStructurePrivacyAnalysis-public/blob/HEAD/utils/plot_3panel_attack_test_sizes.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":"8d7535d6176fe33f"}},{"code_sha256_prefix":"a6d9f7716528dec8","entry":"parse_mean_std","repo":"PriXAI/GraphStructurePrivacyAnalysis-public","repo_kind":"found_in_text","path":"utils/plot_3panel_attack_test_sizes.py","file_url":"https://github.com/PriXAI/GraphStructurePrivacyAnalysis-public/blob/HEAD/utils/plot_3panel_attack_test_sizes.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":"a6d9f7716528dec8"}},{"code_sha256_prefix":"71e3e53d06cf11c7","entry":"snowball_sampling","repo":"PriXAI/GraphStructurePrivacyAnalysis-public","repo_kind":"found_in_text","path":"utils/data_utils.py","file_url":"https://github.com/PriXAI/GraphStructurePrivacyAnalysis-public/blob/HEAD/utils/data_utils.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":"71e3e53d06cf11c7"}},{"code_sha256_prefix":"03c119815e1f2b40","entry":"snowball_sampling_with_train_test","repo":"PriXAI/GraphStructurePrivacyAnalysis-public","repo_kind":"found_in_text","path":"utils/data_utils.py","file_url":"https://github.com/PriXAI/GraphStructurePrivacyAnalysis-public/blob/HEAD/utils/data_utils.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":"03c119815e1f2b40"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}