{"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/jogging-the-memory-of-unlearned-model-through","title":"Jogging the Memory of Unlearned LLMs Through Targeted Relearning Attacks","arxiv_id":"2406.13356","date":"2024-06-19","proceeding":null,"authors":["Shengyuan Hu","Yiwei Fu","Zhiwei Steven Wu","Virginia Smith"],"abstract":"Machine unlearning is a promising approach to mitigate undesirable memorization of training data in LLMs. However, in this work we show that existing approaches for unlearning in LLMs are surprisingly susceptible to a simple set of targeted relearning attacks. With access to only a small and potentially loosely related set of data, we find that we can \"jog\" the memory of unlearned models to reverse the effects of unlearning. For example, we show that relearning on public medical articles can lead an unlearned LLM to output harmful knowledge about bioweapons, and relearning general wiki information about the book series Harry Potter can force the model to output verbatim memorized text. We formalize this unlearning-relearning pipeline, explore the attack across three popular unlearning benchmarks, and discuss future directions and guidelines that result from our study.","url_abs":"https://arxiv.org/abs/2406.13356v3","url_pdf":"https://arxiv.org/pdf/2406.13356v3.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":"jogging-the-memory-of-unlearned-model-through","repo_url":"https://github.com/s-huu/jog_llm_memory","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"articles","task_name":"Articles"},{"task_slug":"machine-unlearning","task_name":"Machine Unlearning"},{"task_slug":"memorization","task_name":"Memorization"}],"methods":[{"method_slug":"set","method_name":"SET"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2406.13356","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.13356"}},"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/s-huu/jog_llm_memory","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":11,"ran_draft_wrong":2,"unverified":3},"by_repo_kind":{"official":{"samples":16,"ran":13,"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":"cdd171f20cd6f53d","entry":"collate_fn","repo":"s-huu/jog_llm_memory","repo_kind":"official","path":"synthetic/data_module.py","file_url":"https://github.com/s-huu/jog_llm_memory/blob/HEAD/synthetic/data_module.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cdd171f20cd6f53d"}},{"code_sha256_prefix":"88a4f13abd54a00c","entry":"compute_metrics","repo":"s-huu/jog_llm_memory","repo_kind":"official","path":"synthetic/dataloader.py","file_url":"https://github.com/s-huu/jog_llm_memory/blob/HEAD/synthetic/dataloader.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"88a4f13abd54a00c"}},{"code_sha256_prefix":"b4caf62fbc9c93a4","entry":"convert_data_to_model_format","repo":"s-huu/jog_llm_memory","repo_kind":"official","path":"synthetic/data_module.py","file_url":"https://github.com/s-huu/jog_llm_memory/blob/HEAD/synthetic/data_module.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b4caf62fbc9c93a4"}},{"code_sha256_prefix":"e951dedc21c69ac1","entry":"custom_data_collator_forget","repo":"s-huu/jog_llm_memory","repo_kind":"official","path":"synthetic/dataloader.py","file_url":"https://github.com/s-huu/jog_llm_memory/blob/HEAD/synthetic/dataloader.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e951dedc21c69ac1"}},{"code_sha256_prefix":"649fc48067a48529","entry":"find_all_linear_names","repo":"s-huu/jog_llm_memory","repo_kind":"official","path":"synthetic/finetune.py","file_url":"https://github.com/s-huu/jog_llm_memory/blob/HEAD/synthetic/finetune.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"649fc48067a48529"}},{"code_sha256_prefix":"5740a4c2fd3b51ed","entry":"forward_with_cache","repo":"s-huu/jog_llm_memory","repo_kind":"official","path":"wmdp/src/utils.py","file_url":"https://github.com/s-huu/jog_llm_memory/blob/HEAD/wmdp/src/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5740a4c2fd3b51ed"}},{"code_sha256_prefix":"28f40801cc5a9fd3","entry":"get_answers","repo":"s-huu/jog_llm_memory","repo_kind":"official","path":"wmdp/src/gpt4_eval.py","file_url":"https://github.com/s-huu/jog_llm_memory/blob/HEAD/wmdp/src/gpt4_eval.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"28f40801cc5a9fd3"}},{"code_sha256_prefix":"2c9cb9e02d070bfd","entry":"get_files","repo":"s-huu/jog_llm_memory","repo_kind":"official","path":"wmdp/src/generate_answers.py","file_url":"https://github.com/s-huu/jog_llm_memory/blob/HEAD/wmdp/src/generate_answers.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2c9cb9e02d070bfd"}},{"code_sha256_prefix":"650d5f6bfcd7d9bb","entry":"get_loss","repo":"s-huu/jog_llm_memory","repo_kind":"official","path":"synthetic/dataloader.py","file_url":"https://github.com/s-huu/jog_llm_memory/blob/HEAD/synthetic/dataloader.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"650d5f6bfcd7d9bb"}},{"code_sha256_prefix":"44e1322cb51c6acf","entry":"get_names","repo":"s-huu/jog_llm_memory","repo_kind":"official","path":"synthetic/data_module.py","file_url":"https://github.com/s-huu/jog_llm_memory/blob/HEAD/synthetic/data_module.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"44e1322cb51c6acf"}},{"code_sha256_prefix":"db42ee03f6308ed9","entry":"get_params","repo":"s-huu/jog_llm_memory","repo_kind":"official","path":"wmdp/src/utils.py","file_url":"https://github.com/s-huu/jog_llm_memory/blob/HEAD/wmdp/src/utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"db42ee03f6308ed9"}},{"code_sha256_prefix":"c85b881c2039a329","entry":"get_questions","repo":"s-huu/jog_llm_memory","repo_kind":"official","path":"wmdp/src/gpt4_eval.py","file_url":"https://github.com/s-huu/jog_llm_memory/blob/HEAD/wmdp/src/gpt4_eval.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c85b881c2039a329"}},{"code_sha256_prefix":"6c542acea5aa211c","entry":"get_total_len","repo":"s-huu/jog_llm_memory","repo_kind":"official","path":"synthetic/utils.py","file_url":"https://github.com/s-huu/jog_llm_memory/blob/HEAD/synthetic/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6c542acea5aa211c"}},{"code_sha256_prefix":"06448b0513272463","entry":"get_model_identifiers_from_yaml","repo":"s-huu/jog_llm_memory","repo_kind":"official","path":"synthetic/utils.py","file_url":"https://github.com/s-huu/jog_llm_memory/blob/HEAD/synthetic/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"06448b0513272463"}},{"code_sha256_prefix":"52ef2a3d873c868f","entry":"get_steering_vec","repo":"s-huu/jog_llm_memory","repo_kind":"official","path":"wmdp/src/utils.py","file_url":"https://github.com/s-huu/jog_llm_memory/blob/HEAD/wmdp/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"52ef2a3d873c868f"}},{"code_sha256_prefix":"87698f5388a86342","entry":"query_gpt","repo":"s-huu/jog_llm_memory","repo_kind":"official","path":"wmdp/src/gpt4_eval.py","file_url":"https://github.com/s-huu/jog_llm_memory/blob/HEAD/wmdp/src/gpt4_eval.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"87698f5388a86342"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}