Metraipolis › archive › dc_17c213786d59
What Was Once Learned May Need to Be Unlearned: Machine Unlearning for Deprecated API Knowledge in Large Language Models — arXiv:2609.25786
- Source
- arXiv (en)
- Original
- https://arxiv.org/abs/2609.25786
- License (as archived)
- CC0-1.0
- Archived
- 2026-10-08T15:16:07.927Z
- SHA-256 of the archived text
196313649ff1e6712a79fe1d7763324f48ea839921610c73f617839cc866a271- Stable URL of this page
https://metraipolis.com/documento/dc_17c213786d59
How to cite
What Was Once Learned May Need to Be Unlearned: Machine Unlearning for Deprecated API Knowledge in Large Language Models — arXiv:2609.25786 — arXiv (en), https://arxiv.org/abs/2609.25786 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_17c213786d59 (Metraipolis archive dc_17c213786d59, sha256 196313649ff1e6712a79fe1d7763324f48ea839921610c73f617839cc866a271)
BibTeX
@misc{dc17c213786d59,
title = {What Was Once Learned May Need to Be Unlearned: Machine Unlearning for Deprecated API Knowledge in Large Language Models — arXiv:2609.25786},
howpublished = {arXiv (en)},
url = {https://arxiv.org/abs/2609.25786},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_17c213786d59; sha256 196313649ff1e6712a79fe1d7763324f48ea839921610c73f617839cc866a271},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.25786. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Large language models (LLMs) for code completion may generate deprecated APIs because their pre-training corpora contain code from historical library versions. Existing approaches use inference-time intervention, model editing, or machine unlearning, but multiple plausible completions make predefined replacements restrictive. Moreover, existing studies rarely verify whether models exhibit the targeted deprecated behavior or evaluate unintended changes to other APIs. We conduct a systematic empirical study of machine unlearning for deprecated API knowledge and construct MUDAPIBench, a behavior-grounded benchmark with over 7,000 model-specific instances derived from 145 deprecated-to-up-to-date API mappings across eight Python libraries. Instances are retained only when the original model generates the target deprecated API. We evaluate eight representative unlearning methods across three code LLMs on deprecated API forgetting, up-to-date API generation, preservation of other and unrelated API behaviors, general code-generation capability, and efficiency. Results show that Gradient Difference (GD) provides the best overall trade-off, suppressing deprecated APIs while preserving other capabilities with moderate computational costs. Further analyses reveal substantial variation across libraries and show that APIs deprecated after the model's training-data cutoff are harder to forget. Layer-wise analyses indicate that GD achieves effective forgetting with comparatively controlled internal changes. Tema degli esploratori: calcolo e infrastrutture (retro-catalogo arXiv: annunci del 2026-09-23 in cs.SE). Categorie arXiv: Software Engineering (cs.SE). Pagina del lavoro: https://arxiv.org/abs/2609.25786 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito). Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina. Letto il 2026-10-08T14:42:48.169Z dalla pagina https://arxiv.org/catchup/cs.SE/2026-09-23?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).