{"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/grain-exact-graph-reconstruction-from","title":"GRAIN: Exact Graph Reconstruction from Gradients","arxiv_id":"2503.01838","date":"2025-03-03","proceeding":null,"authors":["Maria Drencheva","Ivo Petrov","Maximilian Baader","Dimitar I. Dimitrov","Martin Vechev"],"abstract":"Federated learning claims to enable collaborative model training among multiple clients with data privacy by transmitting gradient updates instead of the actual client data. However, recent studies have shown the client privacy is still at risk due to the, so called, gradient inversion attacks which can precisely reconstruct clients' text and image data from the shared gradient updates. While these attacks demonstrate severe privacy risks for certain domains and architectures, the vulnerability of other commonly-used data types, such as graph-structured data, remain under-explored. To bridge this gap, we present GRAIN, the first exact gradient inversion attack on graph data in the honest-but-curious setting that recovers both the structure of the graph and the associated node features. Concretely, we focus on Graph Convolutional Networks (GCN) and Graph Attention Networks (GAT) -- two of the most widely used frameworks for learning on graphs. Our method first utilizes the low-rank structure of GNN gradients to efficiently reconstruct and filter the client subgraphs which are then joined to complete the input graph. We evaluate our approach on molecular, citation, and social network datasets using our novel metric. We show that GRAIN reconstructs up to 80% of all graphs exactly, significantly outperforming the baseline, which achieves up to 20% correctly positioned nodes.","url_abs":"https://arxiv.org/abs/2503.01838v1","url_pdf":"https://arxiv.org/pdf/2503.01838v1.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":"grain-exact-graph-reconstruction-from","repo_url":"https://github.com/insait-institute/grain","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"federated-learning","task_name":"Federated Learning"},{"task_slug":"graph-attention","task_name":"Graph Attention"},{"task_slug":"graph-reconstruction","task_name":"Graph Reconstruction"}],"methods":[{"method_slug":"attention","method_name":"Attention"},{"method_slug":"focus","method_name":"Focus"},{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2503.01838","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2503.01838"}},"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/insait-institute/grain","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":1,"unverified":5},"by_repo_kind":{"official":{"samples":6,"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":"68917fefa350c8e4","entry":"get_param","repo":"insait-institute/grain","repo_kind":"official","path":"src/extract_neptune.py","file_url":"https://github.com/insait-institute/grain/blob/HEAD/src/extract_neptune.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"68917fefa350c8e4"}},{"code_sha256_prefix":"fda60abed9a9f350","entry":"bootstrap_ci","repo":"insait-institute/grain","repo_kind":"official","path":"src/extract_neptune.py","file_url":"https://github.com/insait-institute/grain/blob/HEAD/src/extract_neptune.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fda60abed9a9f350"}},{"code_sha256_prefix":"be3c8c258cbff27b","entry":"get_dataset_stats","repo":"insait-institute/grain","repo_kind":"official","path":"src/data_loading/data_utils.py","file_url":"https://github.com/insait-institute/grain/blob/HEAD/src/data_loading/data_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"be3c8c258cbff27b"}},{"code_sha256_prefix":"60f968de9e7be188","entry":"get_full","repo":"insait-institute/grain","repo_kind":"official","path":"src/extract_neptune.py","file_url":"https://github.com/insait-institute/grain/blob/HEAD/src/extract_neptune.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"60f968de9e7be188"}},{"code_sha256_prefix":"52135ba0acd23d72","entry":"get_pokec_data","repo":"insait-institute/grain","repo_kind":"official","path":"src/data_loading/data_utils.py","file_url":"https://github.com/insait-institute/grain/blob/HEAD/src/data_loading/data_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"52135ba0acd23d72"}},{"code_sha256_prefix":"7e2f7e46dd5c7346","entry":"get_setting","repo":"insait-institute/grain","repo_kind":"official","path":"src/data_loading/data_utils.py","file_url":"https://github.com/insait-institute/grain/blob/HEAD/src/data_loading/data_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7e2f7e46dd5c7346"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}