{"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-probabilistic-perspective-on-unlearning-and","title":"A Probabilistic Perspective on Unlearning and Alignment for Large Language Models","arxiv_id":"2410.03523","date":"2024-10-04","proceeding":null,"authors":["Yan Scholten","Stephan Günnemann","Leo Schwinn"],"abstract":"Comprehensive evaluation of Large Language Models (LLMs) is an open research problem. Existing evaluations rely on deterministic point estimates generated via greedy decoding. However, we find that deterministic evaluations fail to capture the whole output distribution of a model, yielding inaccurate estimations of model capabilities. This is particularly problematic in critical contexts such as unlearning and alignment, where precise model evaluations are crucial. To remedy this, we introduce the first formal probabilistic evaluation framework in LLMs. Namely, we derive novel metrics with high-probability guarantees concerning the output distribution of a model. Our metrics are application-independent and allow practitioners to make more reliable estimates about model capabilities before deployment. Through a case study focused on unlearning, we reveal that deterministic evaluations falsely indicate successful unlearning, whereas our probabilistic evaluations demonstrate that most if not all of the supposedly unlearned information remains accessible in these models. Additionally, we propose a novel unlearning loss based on entropy optimization and adaptive temperature scaling, which significantly improves unlearning in probabilistic settings on recent benchmarks. Our proposed shift from point estimates to probabilistic evaluations of output distributions represents an important step toward comprehensive evaluations of LLMs. Code available at https://github.com/yascho/probabilistic-unlearning.","url_abs":"https://arxiv.org/abs/2410.03523v4","url_pdf":"https://arxiv.org/pdf/2410.03523v4.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-probabilistic-perspective-on-unlearning-and","repo_url":"https://github.com/yascho/probabilistic-unlearning","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2410.03523","atlas_url":"https://app.syntology.ai/?focus=2410.03523","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.03523"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yascho/probabilistic-unlearning","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":5,"unverified":3},"by_repo_kind":{"official":{"samples":8,"ran":5,"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":"97ff4e87d047ea7f","entry":"create_model","repo":"yascho/probabilistic-unlearning","repo_kind":"official","path":"models.py","file_url":"https://github.com/yascho/probabilistic-unlearning/blob/HEAD/models.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":"97ff4e87d047ea7f"}},{"code_sha256_prefix":"2e3349e4cd7e6e7d","entry":"data_collator_unlearning","repo":"yascho/probabilistic-unlearning","repo_kind":"official","path":"unlearning/dataloader.py","file_url":"https://github.com/yascho/probabilistic-unlearning/blob/HEAD/unlearning/dataloader.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":"2e3349e4cd7e6e7d"}},{"code_sha256_prefix":"a71ae147e6732756","entry":"encode_finetune","repo":"yascho/probabilistic-unlearning","repo_kind":"official","path":"unlearning/encoding.py","file_url":"https://github.com/yascho/probabilistic-unlearning/blob/HEAD/unlearning/encoding.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":"a71ae147e6732756"}},{"code_sha256_prefix":"b14c8a1dbd34e6e8","entry":"preprocess","repo":"yascho/probabilistic-unlearning","repo_kind":"official","path":"finetuning/preprocessing.py","file_url":"https://github.com/yascho/probabilistic-unlearning/blob/HEAD/finetuning/preprocessing.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":"b14c8a1dbd34e6e8"}},{"code_sha256_prefix":"d701c28cf7e2b3bf","entry":"preprocess_dataset","repo":"yascho/probabilistic-unlearning","repo_kind":"official","path":"finetuning/preprocessing.py","file_url":"https://github.com/yascho/probabilistic-unlearning/blob/HEAD/finetuning/preprocessing.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":"d701c28cf7e2b3bf"}},{"code_sha256_prefix":"0b7e2114f9a0ecab","entry":"create_model","repo":"yascho/probabilistic-unlearning","repo_kind":"official","path":"unlearning/model.py","file_url":"https://github.com/yascho/probabilistic-unlearning/blob/HEAD/unlearning/model.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":"0b7e2114f9a0ecab"}},{"code_sha256_prefix":"71b115a35fd345f5","entry":"create_model","repo":"yascho/probabilistic-unlearning","repo_kind":"official","path":"finetuning/model.py","file_url":"https://github.com/yascho/probabilistic-unlearning/blob/HEAD/finetuning/model.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":"71b115a35fd345f5"}},{"code_sha256_prefix":"6aaff75e95232315","entry":"load_datasets","repo":"yascho/probabilistic-unlearning","repo_kind":"official","path":"unlearning/dataloader.py","file_url":"https://github.com/yascho/probabilistic-unlearning/blob/HEAD/unlearning/dataloader.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":"6aaff75e95232315"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}