{"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/on-memorization-and-privacy-risks-of","title":"On Memorization and Privacy Risks of Sharpness Aware Minimization","arxiv_id":"2310.00488","date":"2023-09-30","proceeding":null,"authors":["Young In Kim","Pratiksha Agrawal","Johannes O. Royset","Rajiv Khanna"],"abstract":"In many recent works, there is an increased focus on designing algorithms that seek flatter optima for neural network loss optimization as there is empirical evidence that it leads to better generalization performance in many datasets. In this work, we dissect these performance gains through the lens of data memorization in overparameterized models. We define a new metric that helps us identify which data points specifically do algorithms seeking flatter optima do better when compared to vanilla SGD. We find that the generalization gains achieved by Sharpness Aware Minimization (SAM) are particularly pronounced for atypical data points, which necessitate memorization. This insight helps us unearth higher privacy risks associated with SAM, which we verify through exhaustive empirical evaluations. Finally, we propose mitigation strategies to achieve a more desirable accuracy vs privacy tradeoff.","url_abs":"https://arxiv.org/abs/2310.00488v2","url_pdf":"https://arxiv.org/pdf/2310.00488v2.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":[],"tasks":[{"task_slug":"memorization","task_name":"Memorization"}],"methods":[{"method_slug":"aware","method_name":"AWARE"},{"method_slug":"focus","method_name":"Focus"},{"method_slug":"sam","method_name":"SAM"},{"method_slug":"sgd","method_name":"SGD"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2310.00488","atlas_url":"https://app.syntology.ai/?focus=2310.00488","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.00488"}},"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":"deterministic:regex_extraction","url":"https://github.com/weiaicunzai/pytorch-cifar100","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/inspire-group/MIAdefenseSELENA","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_fixture":1,"ran":6,"unverified":2},"by_repo_kind":{"found_in_text":{"samples":9,"ran":7,"repositories":2}},"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":1,"samples":[{"code_sha256_prefix":"18badd533b52adb3","entry":"accuracy","repo":"inspire-group/MIAdefenseSELENA","repo_kind":"found_in_text","path":"utils.py","file_url":"https://github.com/inspire-group/MIAdefenseSELENA/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"18badd533b52adb3"}},{"code_sha256_prefix":"6dc5017fa7e03468","entry":"cw_l2_attack","repo":"inspire-group/MIAdefenseSELENA","repo_kind":"found_in_text","path":"attack/CW_Attack.py","file_url":"https://github.com/inspire-group/MIAdefenseSELENA/blob/HEAD/attack/CW_Attack.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6dc5017fa7e03468"}},{"code_sha256_prefix":"7f77c88b76031ff0","entry":"get_entropy","repo":"inspire-group/MIAdefenseSELENA","repo_kind":"found_in_text","path":"attack/dsq_attack.py","file_url":"https://github.com/inspire-group/MIAdefenseSELENA/blob/HEAD/attack/dsq_attack.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":"7f77c88b76031ff0"}},{"code_sha256_prefix":"b51437675b710cac","entry":"get_l2_loss","repo":"inspire-group/MIAdefenseSELENA","repo_kind":"found_in_text","path":"attack/adaptive_attack.py","file_url":"https://github.com/inspire-group/MIAdefenseSELENA/blob/HEAD/attack/adaptive_attack.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":"b51437675b710cac"}},{"code_sha256_prefix":"578c32174ef2fc47","entry":"mobilenet","repo":"weiaicunzai/pytorch-cifar100","repo_kind":"found_in_text","path":"models/mobilenet.py","file_url":"https://github.com/weiaicunzai/pytorch-cifar100/blob/HEAD/models/mobilenet.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":"578c32174ef2fc47"}},{"code_sha256_prefix":"2f231286618f001d","entry":"print_acc_conf","repo":"inspire-group/MIAdefenseSELENA","repo_kind":"found_in_text","path":"utils.py","file_url":"https://github.com/inspire-group/MIAdefenseSELENA/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2f231286618f001d"}},{"code_sha256_prefix":"3232aadf384d2f02","entry":"threshold_based_inference_attack","repo":"inspire-group/MIAdefenseSELENA","repo_kind":"found_in_text","path":"attack/Aug_Attack.py","file_url":"https://github.com/inspire-group/MIAdefenseSELENA/blob/HEAD/attack/Aug_Attack.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3232aadf384d2f02"}},{"code_sha256_prefix":"386c7184dc049e22","entry":"test_attack","repo":"inspire-group/MIAdefenseSELENA","repo_kind":"found_in_text","path":"attack/dsq_attack.py","file_url":"https://github.com/inspire-group/MIAdefenseSELENA/blob/HEAD/attack/dsq_attack.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":"386c7184dc049e22"}},{"code_sha256_prefix":"3c015b55f3dbabbf","entry":"train_attack","repo":"inspire-group/MIAdefenseSELENA","repo_kind":"found_in_text","path":"attack/dsq_attack.py","file_url":"https://github.com/inspire-group/MIAdefenseSELENA/blob/HEAD/attack/dsq_attack.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":"3c015b55f3dbabbf"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}