{"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/mitigating-privacy-risk-in-membership","title":"Mitigating Privacy Risk in Membership Inference by Convex-Concave Loss","arxiv_id":"2402.05453","date":"2024-02-08","proceeding":null,"authors":["Zhenlong Liu","Lei Feng","Huiping Zhuang","Xiaofeng Cao","Hongxin Wei"],"abstract":"Machine learning models are susceptible to membership inference attacks (MIAs), which aim to infer whether a sample is in the training set. Existing work utilizes gradient ascent to enlarge the loss variance of training data, alleviating the privacy risk. However, optimizing toward a reverse direction may cause the model parameters to oscillate near local minima, leading to instability and suboptimal performance. In this work, we propose a novel method -- Convex-Concave Loss, which enables a high variance of training loss distribution by gradient descent. Our method is motivated by the theoretical analysis that convex losses tend to decrease the loss variance during training. Thus, our key idea behind CCL is to reduce the convexity of loss functions with a concave term. Trained with CCL, neural networks produce losses with high variance for training data, reinforcing the defense against MIAs. Extensive experiments demonstrate the superiority of CCL, achieving state-of-the-art balance in the privacy-utility trade-off.","url_abs":"https://arxiv.org/abs/2402.05453v3","url_pdf":"https://arxiv.org/pdf/2402.05453v3.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":"mitigating-privacy-risk-in-membership","repo_url":"https://github.com/ml-stat-sustech/convexconcaveloss","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2402.05453","atlas_url":"https://app.syntology.ai/?focus=2402.05453","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.05453"}},"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/ml-stat-Sustech/ConvexConcaveLoss","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ml-stat-sustech/convexconcaveloss","reach":{"status":"ok"}}],"summary":{"ran":10,"ran_draft_wrong":4,"ran_honours":1,"unverified":1},"by_repo_kind":{"official":{"samples":16,"ran":15,"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":16,"samples":[{"code_sha256_prefix":"44dc0ab35e0ce208","entry":"CCEL","repo":"ml-stat-sustech/convexconcaveloss","repo_kind":"official","path":"source/defenses/membership_inference/loss_function.py","file_url":"https://github.com/ml-stat-sustech/convexconcaveloss/blob/HEAD/source/defenses/membership_inference/loss_function.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":"44dc0ab35e0ce208"}},{"code_sha256_prefix":"aa4d7b77f7ce2a82","entry":"call_function_from_module","repo":"ml-stat-Sustech/ConvexConcaveLoss","repo_kind":"official","path":"source/utils.py","file_url":"https://github.com/ml-stat-Sustech/ConvexConcaveLoss/blob/HEAD/source/utils.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":"aa4d7b77f7ce2a82"}},{"code_sha256_prefix":"c97bd6f10fdb8caa","entry":"ce_concave_exp_loss","repo":"ml-stat-sustech/convexconcaveloss","repo_kind":"official","path":"source/defenses/membership_inference/loss_function.py","file_url":"https://github.com/ml-stat-sustech/convexconcaveloss/blob/HEAD/source/defenses/membership_inference/loss_function.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c97bd6f10fdb8caa"}},{"code_sha256_prefix":"4dec1b673b8a327b","entry":"conv3x3","repo":"ml-stat-Sustech/ConvexConcaveLoss","repo_kind":"official","path":"source/models/resnet.py","file_url":"https://github.com/ml-stat-Sustech/ConvexConcaveLoss/blob/HEAD/source/models/resnet.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":"4dec1b673b8a327b"}},{"code_sha256_prefix":"bb81c0c5dd65ef6c","entry":"dict_str","repo":"ml-stat-Sustech/ConvexConcaveLoss","repo_kind":"official","path":"source/utils.py","file_url":"https://github.com/ml-stat-Sustech/ConvexConcaveLoss/blob/HEAD/source/utils.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":"bb81c0c5dd65ef6c"}},{"code_sha256_prefix":"b6c954a2933604c5","entry":"focal_loss","repo":"ml-stat-sustech/convexconcaveloss","repo_kind":"official","path":"source/defenses/membership_inference/loss_function.py","file_url":"https://github.com/ml-stat-sustech/convexconcaveloss/blob/HEAD/source/defenses/membership_inference/loss_function.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b6c954a2933604c5"}},{"code_sha256_prefix":"d0e5d7703aefba71","entry":"get_image_shape","repo":"ml-stat-sustech/convexconcaveloss","repo_kind":"official","path":"source/examples/mia.py","file_url":"https://github.com/ml-stat-sustech/convexconcaveloss/blob/HEAD/source/examples/mia.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d0e5d7703aefba71"}},{"code_sha256_prefix":"95e364953588331d","entry":"get_loss","repo":"ml-stat-sustech/convexconcaveloss","repo_kind":"official","path":"source/defenses/membership_inference/loss_function.py","file_url":"https://github.com/ml-stat-sustech/convexconcaveloss/blob/HEAD/source/defenses/membership_inference/loss_function.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"95e364953588331d"}},{"code_sha256_prefix":"d340646b8b16aabd","entry":"p1_score","repo":"ml-stat-Sustech/ConvexConcaveLoss","repo_kind":"official","path":"source/utils.py","file_url":"https://github.com/ml-stat-Sustech/ConvexConcaveLoss/blob/HEAD/source/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d340646b8b16aabd"}},{"code_sha256_prefix":"7b26b959ff1b54da","entry":"prepare_backdoor_attack","repo":"ml-stat-Sustech/ConvexConcaveLoss","repo_kind":"official","path":"source/data_preprocessing/data_loader_target.py","file_url":"https://github.com/ml-stat-Sustech/ConvexConcaveLoss/blob/HEAD/source/data_preprocessing/data_loader_target.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":"7b26b959ff1b54da"}},{"code_sha256_prefix":"0f643892107414ea","entry":"prepare_dataset","repo":"ml-stat-Sustech/ConvexConcaveLoss","repo_kind":"official","path":"source/data_preprocessing/dataset_preprocessing.py","file_url":"https://github.com/ml-stat-Sustech/ConvexConcaveLoss/blob/HEAD/source/data_preprocessing/dataset_preprocessing.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":"0f643892107414ea"}},{"code_sha256_prefix":"ce042b6471ccd220","entry":"prepare_dataset_inference","repo":"ml-stat-Sustech/ConvexConcaveLoss","repo_kind":"official","path":"source/data_preprocessing/dataset_preprocessing.py","file_url":"https://github.com/ml-stat-Sustech/ConvexConcaveLoss/blob/HEAD/source/data_preprocessing/dataset_preprocessing.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":"ce042b6471ccd220"}},{"code_sha256_prefix":"b91749293b14eb0e","entry":"prepare_dataset_ni","repo":"ml-stat-Sustech/ConvexConcaveLoss","repo_kind":"official","path":"source/data_preprocessing/dataset_preprocessing.py","file_url":"https://github.com/ml-stat-Sustech/ConvexConcaveLoss/blob/HEAD/source/data_preprocessing/dataset_preprocessing.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":"b91749293b14eb0e"}},{"code_sha256_prefix":"6ee069ade3ca3b94","entry":"prepare_texas","repo":"ml-stat-Sustech/ConvexConcaveLoss","repo_kind":"official","path":"source/data_preprocessing/data_no_image.py","file_url":"https://github.com/ml-stat-Sustech/ConvexConcaveLoss/blob/HEAD/source/data_preprocessing/data_no_image.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":"6ee069ade3ca3b94"}},{"code_sha256_prefix":"3f8a0715e9d1a0db","entry":"taylor_exp","repo":"ml-stat-sustech/convexconcaveloss","repo_kind":"official","path":"source/defenses/membership_inference/loss_function.py","file_url":"https://github.com/ml-stat-sustech/convexconcaveloss/blob/HEAD/source/defenses/membership_inference/loss_function.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3f8a0715e9d1a0db"}},{"code_sha256_prefix":"9330d696182447fd","entry":"prepare_purchase","repo":"ml-stat-Sustech/ConvexConcaveLoss","repo_kind":"official","path":"source/data_preprocessing/data_no_image.py","file_url":"https://github.com/ml-stat-Sustech/ConvexConcaveLoss/blob/HEAD/source/data_preprocessing/data_no_image.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9330d696182447fd"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}