{"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/a-cognac-shot-to-forget-bad-memories","title":"A Cognac Shot To Forget Bad Memories: Corrective Unlearning for Graph Neural Networks","arxiv_id":"2412.00789","date":"2024-12-01","proceeding":null,"authors":["Varshita Kolipaka","Akshit Sinha","Debangan Mishra","Sumit Kumar","Arvindh Arun","Shashwat Goel","Ponnurangam Kumaraguru"],"abstract":"Graph Neural Networks (GNNs) are increasingly being used for a variety of ML applications on graph data. Because graph data does not follow the independently and identically distributed (i.i.d.) assumption, adversarial manipulations or incorrect data can propagate to other data points through message passing, which deteriorates the model's performance. To allow model developers to remove the adverse effects of manipulated entities from a trained GNN, we study the recently formulated problem of Corrective Unlearning. We find that current graph unlearning methods fail to unlearn the effect of manipulations even when the whole manipulated set is known. We introduce a new graph unlearning method, Cognac, which can unlearn the effect of the manipulation set even when only 5% of it is identified. It recovers most of the performance of a strong oracle with fully corrected training data, even beating retraining from scratch without the deletion set while being 8x more efficient. We hope our work assists GNN developers in mitigating harmful effects caused by issues in real-world data, post-training. Our code is publicly available at https://github.com/cognac-gnn-unlearning/corrective-unlearning-for-gnns","url_abs":"https://arxiv.org/abs/2412.00789v4","url_pdf":"https://arxiv.org/pdf/2412.00789v4.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":"a-cognac-shot-to-forget-bad-memories","repo_url":"https://github.com/cognac-gnn-unlearning/corrective-unlearning-for-gnns","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"a-cognac-shot-to-forget-bad-memories","repo_url":"https://github.com/varshitakolipaka/corrective-unlearning-for-gnns","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[{"method_slug":"set","method_name":"SET"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2412.00789","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2412.00789"}},"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/cognac-gnn-unlearning/corrective-unlearning-for-gnns","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/varshitakolipaka/corrective-unlearning-for-gnns","reach":null}],"summary":{"ran_draft_wrong":14,"ran":1,"ran_violates":1,"unverified":4},"by_repo_kind":{"official":{"samples":20,"ran":16,"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":20,"samples":[{"code_sha256_prefix":"41fbee11514c9fe6","entry":"BoundedKLDMean","repo":"varshitakolipaka/corrective-unlearning-for-gnns","repo_kind":"official","path":"trainers/gnndelete.py","file_url":"https://github.com/varshitakolipaka/corrective-unlearning-for-gnns/blob/HEAD/trainers/gnndelete.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":"41fbee11514c9fe6"}},{"code_sha256_prefix":"d7211c3da551067a","entry":"BoundedKLDSum","repo":"varshitakolipaka/corrective-unlearning-for-gnns","repo_kind":"official","path":"trainers/gnndelete.py","file_url":"https://github.com/varshitakolipaka/corrective-unlearning-for-gnns/blob/HEAD/trainers/gnndelete.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":"d7211c3da551067a"}},{"code_sha256_prefix":"75453f8bbb9b082b","entry":"CosineDistanceMean","repo":"varshitakolipaka/corrective-unlearning-for-gnns","repo_kind":"official","path":"trainers/gnndelete.py","file_url":"https://github.com/varshitakolipaka/corrective-unlearning-for-gnns/blob/HEAD/trainers/gnndelete.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":"75453f8bbb9b082b"}},{"code_sha256_prefix":"6f5ab12828b66ccb","entry":"CosineDistanceSum","repo":"varshitakolipaka/corrective-unlearning-for-gnns","repo_kind":"official","path":"trainers/gnndelete.py","file_url":"https://github.com/varshitakolipaka/corrective-unlearning-for-gnns/blob/HEAD/trainers/gnndelete.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":"6f5ab12828b66ccb"}},{"code_sha256_prefix":"9bf51323e6eddd19","entry":"LinearCKA","repo":"varshitakolipaka/corrective-unlearning-for-gnns","repo_kind":"official","path":"trainers/gnndelete.py","file_url":"https://github.com/varshitakolipaka/corrective-unlearning-for-gnns/blob/HEAD/trainers/gnndelete.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":"9bf51323e6eddd19"}},{"code_sha256_prefix":"d89212ddb4a1c029","entry":"RBFCKA","repo":"varshitakolipaka/corrective-unlearning-for-gnns","repo_kind":"official","path":"trainers/gnndelete.py","file_url":"https://github.com/varshitakolipaka/corrective-unlearning-for-gnns/blob/HEAD/trainers/gnndelete.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":"d89212ddb4a1c029"}},{"code_sha256_prefix":"82ceb13449ee8091","entry":"Trainer","repo":"cognac-gnn-unlearning/corrective-unlearning-for-gnns","repo_kind":"official","path":"trainers/cognac.py","file_url":"https://github.com/cognac-gnn-unlearning/corrective-unlearning-for-gnns/blob/HEAD/trainers/cognac.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":"82ceb13449ee8091"}},{"code_sha256_prefix":"c4698c3471ae618b","entry":"centering","repo":"varshitakolipaka/corrective-unlearning-for-gnns","repo_kind":"official","path":"trainers/gnndelete.py","file_url":"https://github.com/varshitakolipaka/corrective-unlearning-for-gnns/blob/HEAD/trainers/gnndelete.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":"c4698c3471ae618b"}},{"code_sha256_prefix":"9583d125295289a4","entry":"compare_results","repo":"cognac-gnn-unlearning/corrective-unlearning-for-gnns","repo_kind":"official","path":"run_cognac_best.py","file_url":"https://github.com/cognac-gnn-unlearning/corrective-unlearning-for-gnns/blob/HEAD/run_cognac_best.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":"9583d125295289a4"}},{"code_sha256_prefix":"aef32d5f9d2e066f","entry":"distill_kl_loss","repo":"cognac-gnn-unlearning/corrective-unlearning-for-gnns","repo_kind":"official","path":"trainers/cognac.py","file_url":"https://github.com/cognac-gnn-unlearning/corrective-unlearning-for-gnns/blob/HEAD/trainers/cognac.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"aef32d5f9d2e066f"}},{"code_sha256_prefix":"81920fffae01e70d","entry":"get_loss_fct","repo":"varshitakolipaka/corrective-unlearning-for-gnns","repo_kind":"official","path":"trainers/gnndelete.py","file_url":"https://github.com/varshitakolipaka/corrective-unlearning-for-gnns/blob/HEAD/trainers/gnndelete.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"81920fffae01e70d"}},{"code_sha256_prefix":"bcd0dd0a115414f9","entry":"kernel_HSIC","repo":"varshitakolipaka/corrective-unlearning-for-gnns","repo_kind":"official","path":"trainers/gnndelete.py","file_url":"https://github.com/varshitakolipaka/corrective-unlearning-for-gnns/blob/HEAD/trainers/gnndelete.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":"bcd0dd0a115414f9"}},{"code_sha256_prefix":"1736820e2d413f39","entry":"linear_HSIC","repo":"varshitakolipaka/corrective-unlearning-for-gnns","repo_kind":"official","path":"trainers/gnndelete.py","file_url":"https://github.com/varshitakolipaka/corrective-unlearning-for-gnns/blob/HEAD/trainers/gnndelete.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":"1736820e2d413f39"}},{"code_sha256_prefix":"48b102488b75c27f","entry":"rbf","repo":"varshitakolipaka/corrective-unlearning-for-gnns","repo_kind":"official","path":"trainers/gnndelete.py","file_url":"https://github.com/varshitakolipaka/corrective-unlearning-for-gnns/blob/HEAD/trainers/gnndelete.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":"48b102488b75c27f"}},{"code_sha256_prefix":"f7b12db3f3b994f5","entry":"run_command","repo":"cognac-gnn-unlearning/corrective-unlearning-for-gnns","repo_kind":"official","path":"run_cognac_best.py","file_url":"https://github.com/cognac-gnn-unlearning/corrective-unlearning-for-gnns/blob/HEAD/run_cognac_best.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f7b12db3f3b994f5"}},{"code_sha256_prefix":"4630cf908a804bb0","entry":"time_it","repo":"cognac-gnn-unlearning/corrective-unlearning-for-gnns","repo_kind":"official","path":"trainers/cognac.py","file_url":"https://github.com/cognac-gnn-unlearning/corrective-unlearning-for-gnns/blob/HEAD/trainers/cognac.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4630cf908a804bb0"}},{"code_sha256_prefix":"a70915d6842ff5eb","entry":"CognacTrainer","repo":"cognac-gnn-unlearning/corrective-unlearning-for-gnns","repo_kind":"official","path":"trainers/cognac.py","file_url":"https://github.com/cognac-gnn-unlearning/corrective-unlearning-for-gnns/blob/HEAD/trainers/cognac.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":"a70915d6842ff5eb"}},{"code_sha256_prefix":"2fff7bcfe4b696e5","entry":"GNNDeleteNodeembTrainer","repo":"varshitakolipaka/corrective-unlearning-for-gnns","repo_kind":"official","path":"trainers/gnndelete.py","file_url":"https://github.com/varshitakolipaka/corrective-unlearning-for-gnns/blob/HEAD/trainers/gnndelete.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":"2fff7bcfe4b696e5"}},{"code_sha256_prefix":"a1288bc2236215bf","entry":"Trainer","repo":"varshitakolipaka/corrective-unlearning-for-gnns","repo_kind":"official","path":"trainers/gnndelete.py","file_url":"https://github.com/varshitakolipaka/corrective-unlearning-for-gnns/blob/HEAD/trainers/gnndelete.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":"a1288bc2236215bf"}},{"code_sha256_prefix":"fa6364f2d155e1e9","entry":"parse_results_from_logs","repo":"cognac-gnn-unlearning/corrective-unlearning-for-gnns","repo_kind":"official","path":"run_cognac_best.py","file_url":"https://github.com/cognac-gnn-unlearning/corrective-unlearning-for-gnns/blob/HEAD/run_cognac_best.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":"fa6364f2d155e1e9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}