{"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/unified-gradient-based-machine-unlearning","title":"Unified Gradient-Based Machine Unlearning with Remain Geometry Enhancement","arxiv_id":"2409.19732","date":"2024-09-29","proceeding":null,"authors":["Zhehao Huang","Xinwen Cheng","JingHao Zheng","Haoran Wang","Zhengbao He","Tao Li","Xiaolin Huang"],"abstract":"Machine unlearning (MU) has emerged to enhance the privacy and trustworthiness of deep neural networks. Approximate MU is a practical method for large-scale models. Our investigation into approximate MU starts with identifying the steepest descent direction, minimizing the output Kullback-Leibler divergence to exact MU inside a parameters' neighborhood. This probed direction decomposes into three components: weighted forgetting gradient ascent, fine-tuning retaining gradient descent, and a weight saliency matrix. Such decomposition derived from Euclidean metric encompasses most existing gradient-based MU methods. Nevertheless, adhering to Euclidean space may result in sub-optimal iterative trajectories due to the overlooked geometric structure of the output probability space. We suggest embedding the unlearning update into a manifold rendered by the remaining geometry, incorporating second-order Hessian from the remaining data. It helps prevent effective unlearning from interfering with the retained performance. However, computing the second-order Hessian for large-scale models is intractable. To efficiently leverage the benefits of Hessian modulation, we propose a fast-slow parameter update strategy to implicitly approximate the up-to-date salient unlearning direction. Free from specific modal constraints, our approach is adaptable across computer vision unlearning tasks, including classification and generation. Extensive experiments validate our efficacy and efficiency. Notably, our method successfully performs class-forgetting on ImageNet using DiT and forgets a class on CIFAR-10 using DDPM in just 50 steps, compared to thousands of steps required by previous methods.","url_abs":"https://arxiv.org/abs/2409.19732v1","url_pdf":"https://arxiv.org/pdf/2409.19732v1.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":"unified-gradient-based-machine-unlearning","repo_url":"https://github.com/k1nght/unified-unlearning-w-remain-geometry","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"unified-gradient-based-machine-unlearning","repo_url":"https://github.com/lioutang/unlearn-apollo-attack","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"machine-unlearning","task_name":"Machine Unlearning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2409.19732","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2409.19732"}},"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":"deterministic:regex_extraction","url":"https://github.com/OPTML-Group/Unlearn-Saliency","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/meghdadk/SCRUB","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/clear-nus/selective-amnesia","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/rohitgandikota/erasing","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lioutang/unlearn-apollo-attack","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/k1nght/unified-unlearning-w-remain-geometry","reach":{"status":"ok"}}],"summary":{"ran_fixture":4,"ran":5,"ran_draft_wrong":2,"ran_honours":1,"unverified":14},"by_repo_kind":{"listed":{"samples":6,"ran":0,"repositories":1},"found_in_text":{"samples":19,"ran":12,"repositories":3}},"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":3,"samples":[{"code_sha256_prefix":"1b3f6a248551b312","entry":"GA","repo":"OPTML-Group/Unlearn-Saliency","repo_kind":"found_in_text","path":"Classification/unlearn/GA_prune.py","file_url":"https://github.com/OPTML-Group/Unlearn-Saliency/blob/HEAD/Classification/unlearn/GA_prune.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1b3f6a248551b312"}},{"code_sha256_prefix":"29136f2953d790e8","entry":"GetImageFolderLoader","repo":"clear-nus/selective-amnesia","repo_kind":"found_in_text","path":"ddpm/classifier_evaluation.py","file_url":"https://github.com/clear-nus/selective-amnesia/blob/HEAD/ddpm/classifier_evaluation.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":"29136f2953d790e8"}},{"code_sha256_prefix":"66de5a5babf9c9d8","entry":"get_dataset_image_folder","repo":"clear-nus/selective-amnesia","repo_kind":"found_in_text","path":"ddpm/train_classifier.py","file_url":"https://github.com/clear-nus/selective-amnesia/blob/HEAD/ddpm/train_classifier.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":"66de5a5babf9c9d8"}},{"code_sha256_prefix":"cb49209c125de1b4","entry":"get_timestep_embedding","repo":"clear-nus/selective-amnesia","repo_kind":"found_in_text","path":"ddpm/models/diffusion.py","file_url":"https://github.com/clear-nus/selective-amnesia/blob/HEAD/ddpm/models/diffusion.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cb49209c125de1b4"}},{"code_sha256_prefix":"c7ae957080f6f740","entry":"get_x_y_from_data_dict","repo":"OPTML-Group/Unlearn-Saliency","repo_kind":"found_in_text","path":"Classification/unlearn/GA_prune.py","file_url":"https://github.com/OPTML-Group/Unlearn-Saliency/blob/HEAD/Classification/unlearn/GA_prune.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c7ae957080f6f740"}},{"code_sha256_prefix":"0885bc1a1a34f5eb","entry":"l2_penalty","repo":"meghdadk/SCRUB","repo_kind":"found_in_text","path":"main_merged.py","file_url":"https://github.com/meghdadk/SCRUB/blob/HEAD/main_merged.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":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"0885bc1a1a34f5eb"}},{"code_sha256_prefix":"372b74ad7eb6ab5d","entry":"loss_function","repo":"clear-nus/selective-amnesia","repo_kind":"found_in_text","path":"vae/model.py","file_url":"https://github.com/clear-nus/selective-amnesia/blob/HEAD/vae/model.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":"372b74ad7eb6ab5d"}},{"code_sha256_prefix":"36a45cceb1209d2f","entry":"noise_estimation_loss","repo":"clear-nus/selective-amnesia","repo_kind":"found_in_text","path":"ddpm/functions/losses.py","file_url":"https://github.com/clear-nus/selective-amnesia/blob/HEAD/ddpm/functions/losses.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":"36a45cceb1209d2f"}},{"code_sha256_prefix":"3137073275f8c21a","entry":"nonlinearity","repo":"clear-nus/selective-amnesia","repo_kind":"found_in_text","path":"ddpm/models/diffusion.py","file_url":"https://github.com/clear-nus/selective-amnesia/blob/HEAD/ddpm/models/diffusion.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3137073275f8c21a"}},{"code_sha256_prefix":"3c6433dd421724e0","entry":"prob_mask_like","repo":"clear-nus/selective-amnesia","repo_kind":"found_in_text","path":"ddpm/models/diffusion.py","file_url":"https://github.com/clear-nus/selective-amnesia/blob/HEAD/ddpm/models/diffusion.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3c6433dd421724e0"}},{"code_sha256_prefix":"0bae0d076b1ae674","entry":"read_images_folder","repo":"clear-nus/selective-amnesia","repo_kind":"found_in_text","path":"ddpm/evaluator.py","file_url":"https://github.com/clear-nus/selective-amnesia/blob/HEAD/ddpm/evaluator.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":"0bae0d076b1ae674"}},{"code_sha256_prefix":"def64f7467ecb30c","entry":"validate","repo":"OPTML-Group/Unlearn-Saliency","repo_kind":"found_in_text","path":"Classification/unlearn/GA_prune.py","file_url":"https://github.com/OPTML-Group/Unlearn-Saliency/blob/HEAD/Classification/unlearn/GA_prune.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"def64f7467ecb30c"}},{"code_sha256_prefix":"3d829155d40ef755","entry":"DistillLoss","repo":"lioutang/unlearn-apollo-attack","repo_kind":"listed","path":"unlearn/bad_teacher.py","file_url":"https://github.com/lioutang/unlearn-apollo-attack/blob/HEAD/unlearn/bad_teacher.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":"3d829155d40ef755"}},{"code_sha256_prefix":"28baf7f344ef0caa","entry":"GA_prune","repo":"OPTML-Group/Unlearn-Saliency","repo_kind":"found_in_text","path":"Classification/unlearn/GA_prune.py","file_url":"https://github.com/OPTML-Group/Unlearn-Saliency/blob/HEAD/Classification/unlearn/GA_prune.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":"28baf7f344ef0caa"}},{"code_sha256_prefix":"f0c9a29156911331","entry":"accuracy","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"f0c9a29156911331"}},{"code_sha256_prefix":"d278a27b738c2136","entry":"all_but_one_class_dataset","repo":"clear-nus/selective-amnesia","repo_kind":"found_in_text","path":"ddpm/save_base_dataset.py","file_url":"https://github.com/clear-nus/selective-amnesia/blob/HEAD/ddpm/save_base_dataset.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":"d278a27b738c2136"}},{"code_sha256_prefix":"900e51f145a62a95","entry":"batched_loss_","repo":"lioutang/unlearn-apollo-attack","repo_kind":"listed","path":"attacks/Apollo.py","file_url":"https://github.com/lioutang/unlearn-apollo-attack/blob/HEAD/attacks/Apollo.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":"900e51f145a62a95"}},{"code_sha256_prefix":"2c9afdad86950b96","entry":"batched_models_","repo":"lioutang/unlearn-apollo-attack","repo_kind":"listed","path":"attacks/Apollo.py","file_url":"https://github.com/lioutang/unlearn-apollo-attack/blob/HEAD/attacks/Apollo.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":"2c9afdad86950b96"}},{"code_sha256_prefix":"403a67ad5e70ec17","entry":"get_dataset","repo":"clear-nus/selective-amnesia","repo_kind":"found_in_text","path":"ddpm/train_classifier.py","file_url":"https://github.com/clear-nus/selective-amnesia/blob/HEAD/ddpm/train_classifier.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":"403a67ad5e70ec17"}},{"code_sha256_prefix":"323d03d62e0533c7","entry":"get_idx_loaders","repo":"lioutang/unlearn-apollo-attack","repo_kind":"listed","path":"attack.py","file_url":"https://github.com/lioutang/unlearn-apollo-attack/blob/HEAD/attack.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":"323d03d62e0533c7"}},{"code_sha256_prefix":"657432e743b32d39","entry":"noise_estimation_loss_conditional","repo":"clear-nus/selective-amnesia","repo_kind":"found_in_text","path":"ddpm/functions/losses.py","file_url":"https://github.com/clear-nus/selective-amnesia/blob/HEAD/ddpm/functions/losses.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":"657432e743b32d39"}},{"code_sha256_prefix":"0d878f551236258c","entry":"proj","repo":"lioutang/unlearn-apollo-attack","repo_kind":"listed","path":"attacks/Apollo.py","file_url":"https://github.com/lioutang/unlearn-apollo-attack/blob/HEAD/attacks/Apollo.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":"0d878f551236258c"}},{"code_sha256_prefix":"9510c6df76e617f1","entry":"run_epoch","repo":"meghdadk/SCRUB","repo_kind":"found_in_text","path":"main_merged.py","file_url":"https://github.com/meghdadk/SCRUB/blob/HEAD/main_merged.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"9510c6df76e617f1"}},{"code_sha256_prefix":"632b4796f64ea2f5","entry":"save_checkpoint","repo":"OPTML-Group/Unlearn-Saliency","repo_kind":"found_in_text","path":"Classification/unlearn/GA_prune.py","file_url":"https://github.com/OPTML-Group/Unlearn-Saliency/blob/HEAD/Classification/unlearn/GA_prune.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":"632b4796f64ea2f5"}},{"code_sha256_prefix":"f1ab27640c7765be","entry":"setminus","repo":"lioutang/unlearn-apollo-attack","repo_kind":"listed","path":"attack.py","file_url":"https://github.com/lioutang/unlearn-apollo-attack/blob/HEAD/attack.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":"f1ab27640c7765be"}},{"code_sha256_prefix":"f1e544cbc00ca5fd","entry":"warmup_lr","repo":"OPTML-Group/Unlearn-Saliency","repo_kind":"found_in_text","path":"Classification/unlearn/GA_prune.py","file_url":"https://github.com/OPTML-Group/Unlearn-Saliency/blob/HEAD/Classification/unlearn/GA_prune.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":"f1e544cbc00ca5fd"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}