{"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/unlearning-isn-t-invisible-detecting","title":"Unlearning Isn't Invisible: Detecting Unlearning Traces in LLMs from Model Outputs","arxiv_id":"2506.14003","date":"2025-06-16","proceeding":null,"authors":["YiWei Chen","Soumyadeep Pal","Yimeng Zhang","Qing Qu","Sijia Liu"],"abstract":"Machine unlearning (MU) for large language models (LLMs), commonly referred to as LLM unlearning, seeks to remove specific undesirable data or knowledge from a trained model, while maintaining its performance on standard tasks. While unlearning plays a vital role in protecting data privacy, enforcing copyright, and mitigating sociotechnical harms in LLMs, we identify a new vulnerability post-unlearning: unlearning trace detection. We discover that unlearning leaves behind persistent ''fingerprints'' in LLMs, detectable traces in both model behavior and internal representations. These traces can be identified from output responses, even when prompted with forget-irrelevant inputs. Specifically, a simple supervised classifier can reliably determine whether a model has undergone unlearning based solely on its textual outputs. Further analysis shows that these traces are embedded in intermediate activations and propagate nonlinearly to the final layer, forming low-dimensional, learnable manifolds in activation space. Through extensive experiments, we show that forget-relevant prompts enable over 90% accuracy in detecting unlearning traces across all model sizes. Even with forget-irrelevant inputs, large LLMs maintain high detectability, demonstrating the broad applicability of unlearning trace detection. These findings reveal that unlearning leaves measurable signatures, introducing a new risk of reverse-engineering forgotten information when a model is identified as unlearned given an input query. Codes are available at [this URL](https://github.com/OPTML-Group/Unlearn-Trace).","url_abs":"https://arxiv.org/abs/2506.14003v1","url_pdf":"https://arxiv.org/pdf/2506.14003v1.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":"unlearning-isn-t-invisible-detecting","repo_url":"https://github.com/optml-group/unlearn-trace","is_official":1,"mentioned_in_paper":1,"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=2506.14003","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2506.14003"}},"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-Trace","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/optml-group/unlearn-trace","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":7},"by_repo_kind":{"official":{"samples":7,"ran":0,"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":"726c7400ec239162","entry":"create_dataset","repo":"OPTML-Group/Unlearn-Trace","repo_kind":"official","path":"generate_response.py","file_url":"https://github.com/OPTML-Group/Unlearn-Trace/blob/HEAD/generate_response.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":"726c7400ec239162"}},{"code_sha256_prefix":"7065a0494ef687e5","entry":"create_dataset_from_json","repo":"OPTML-Group/Unlearn-Trace","repo_kind":"official","path":"generate_wmdp_response.py","file_url":"https://github.com/OPTML-Group/Unlearn-Trace/blob/HEAD/generate_wmdp_response.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":"7065a0494ef687e5"}},{"code_sha256_prefix":"67ea27e453497ccc","entry":"load_dataset","repo":"OPTML-Group/Unlearn-Trace","repo_kind":"official","path":"classification.py","file_url":"https://github.com/OPTML-Group/Unlearn-Trace/blob/HEAD/classification.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":"67ea27e453497ccc"}},{"code_sha256_prefix":"c6c3d297bf440870","entry":"merge_fixed","repo":"OPTML-Group/Unlearn-Trace","repo_kind":"official","path":"data_process/mixed_eval.py","file_url":"https://github.com/OPTML-Group/Unlearn-Trace/blob/HEAD/data_process/mixed_eval.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":"c6c3d297bf440870"}},{"code_sha256_prefix":"b292f15dd2509309","entry":"merge_fixed","repo":"OPTML-Group/Unlearn-Trace","repo_kind":"official","path":"data_process/mixed_train.py","file_url":"https://github.com/OPTML-Group/Unlearn-Trace/blob/HEAD/data_process/mixed_train.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":"b292f15dd2509309"}},{"code_sha256_prefix":"c557f5e22a5ff852","entry":"normalize_question","repo":"OPTML-Group/Unlearn-Trace","repo_kind":"official","path":"data_process/split.py","file_url":"https://github.com/OPTML-Group/Unlearn-Trace/blob/HEAD/data_process/split.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":"c557f5e22a5ff852"}},{"code_sha256_prefix":"9cbe3b77443b46dc","entry":"relaxed_equal","repo":"OPTML-Group/Unlearn-Trace","repo_kind":"official","path":"data_process/split.py","file_url":"https://github.com/OPTML-Group/Unlearn-Trace/blob/HEAD/data_process/split.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":"9cbe3b77443b46dc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}