{"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/evaluating-gradient-inversion-attacks-and-1","title":"Evaluating Gradient Inversion Attacks and Defenses in Federated Learning","arxiv_id":"2112.00059","date":"2021-11-30","proceeding":"NeurIPS 2021 12","authors":["Yangsibo Huang","Samyak Gupta","Zhao Song","Kai Li","Sanjeev Arora"],"abstract":"Gradient inversion attack (or input recovery from gradient) is an emerging threat to the security and privacy preservation of Federated learning, whereby malicious eavesdroppers or participants in the protocol can recover (partially) the clients' private data. This paper evaluates existing attacks and defenses. We find that some attacks make strong assumptions about the setup. Relaxing such assumptions can substantially weaken these attacks. We then evaluate the benefits of three proposed defense mechanisms against gradient inversion attacks. We show the trade-offs of privacy leakage and data utility of these defense methods, and find that combining them in an appropriate manner makes the attack less effective, even under the original strong assumptions. We also estimate the computation cost of end-to-end recovery of a single image under each evaluated defense. Our findings suggest that the state-of-the-art attacks can currently be defended against with minor data utility loss, as summarized in a list of potential strategies. Our code is available at: https://github.com/Princeton-SysML/GradAttack.","url_abs":"https://arxiv.org/abs/2112.00059v1","url_pdf":"https://arxiv.org/pdf/2112.00059v1.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":"evaluating-gradient-inversion-attacks-and-1","repo_url":"https://github.com/Princeton-SysML/GradAttack","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"federated-learning","task_name":"Federated Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2112.00059","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2112.00059"}},"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/Princeton-SysML/GradAttack","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":3,"unverified":8},"by_repo_kind":{"official":{"samples":11,"ran":3,"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":"7b20f1288903c47c","entry":"ResNet18","repo":"Princeton-SysML/GradAttack","repo_kind":"official","path":"gradattack/models/resnet.py","file_url":"https://github.com/Princeton-SysML/GradAttack/blob/HEAD/gradattack/models/resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7b20f1288903c47c"}},{"code_sha256_prefix":"d9def42110729a85","entry":"conv1x1","repo":"Princeton-SysML/GradAttack","repo_kind":"official","path":"gradattack/models/multihead_resnet.py","file_url":"https://github.com/Princeton-SysML/GradAttack/blob/HEAD/gradattack/models/multihead_resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d9def42110729a85"}},{"code_sha256_prefix":"fac5364e2f53c6db","entry":"conv3x3","repo":"Princeton-SysML/GradAttack","repo_kind":"official","path":"gradattack/models/multihead_resnet.py","file_url":"https://github.com/Princeton-SysML/GradAttack/blob/HEAD/gradattack/models/multihead_resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fac5364e2f53c6db"}},{"code_sha256_prefix":"25cd9a51219827a6","entry":"COVIDNet","repo":"Princeton-SysML/GradAttack","repo_kind":"official","path":"gradattack/models/covidmodel.py","file_url":"https://github.com/Princeton-SysML/GradAttack/blob/HEAD/gradattack/models/covidmodel.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":"25cd9a51219827a6"}},{"code_sha256_prefix":"1bbda2f622c88a30","entry":"ResNet18_COVID","repo":"Princeton-SysML/GradAttack","repo_kind":"official","path":"gradattack/models/covidmodel.py","file_url":"https://github.com/Princeton-SysML/GradAttack/blob/HEAD/gradattack/models/covidmodel.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":"1bbda2f622c88a30"}},{"code_sha256_prefix":"ce243ee8f74316df","entry":"ResNet18_basic","repo":"Princeton-SysML/GradAttack","repo_kind":"official","path":"gradattack/models/resnet.py","file_url":"https://github.com/Princeton-SysML/GradAttack/blob/HEAD/gradattack/models/resnet.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":"ce243ee8f74316df"}},{"code_sha256_prefix":"95e604d678f53cbc","entry":"extract_attack_set","repo":"Princeton-SysML/GradAttack","repo_kind":"official","path":"gradattack/datamodules.py","file_url":"https://github.com/Princeton-SysML/GradAttack/blob/HEAD/gradattack/datamodules.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":"95e604d678f53cbc"}},{"code_sha256_prefix":"84f4449a4df70e99","entry":"multihead_resnet50","repo":"Princeton-SysML/GradAttack","repo_kind":"official","path":"gradattack/models/multihead_resnet.py","file_url":"https://github.com/Princeton-SysML/GradAttack/blob/HEAD/gradattack/models/multihead_resnet.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":"84f4449a4df70e99"}},{"code_sha256_prefix":"41451b6f68ad5502","entry":"nasnet","repo":"Princeton-SysML/GradAttack","repo_kind":"official","path":"gradattack/models/nasnet.py","file_url":"https://github.com/Princeton-SysML/GradAttack/blob/HEAD/gradattack/models/nasnet.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":"41451b6f68ad5502"}},{"code_sha256_prefix":"ee7757935a162984","entry":"resnext_8x64d","repo":"Princeton-SysML/GradAttack","repo_kind":"official","path":"gradattack/models/resnext.py","file_url":"https://github.com/Princeton-SysML/GradAttack/blob/HEAD/gradattack/models/resnext.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":"ee7757935a162984"}},{"code_sha256_prefix":"491cc519cd049dad","entry":"train_val_split","repo":"Princeton-SysML/GradAttack","repo_kind":"official","path":"gradattack/datamodules.py","file_url":"https://github.com/Princeton-SysML/GradAttack/blob/HEAD/gradattack/datamodules.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":"491cc519cd049dad"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}