Paper · 2026 · Open access
Towards Knowledge Alignment in Code LLMs: Contrastive Unlearning for Evolving APIs}
Figshare · Published 15 May 2026 · DOI 10.6084/m9.figshare.32294028
In brief
“Towards Knowledge Alignment in Code LLMs: Contrastive Unlearning for Evolving APIs}” is a 2026 paper by Huy Ngoc Tran, published in Figshare. OpenAlex counts 1 citations as of 19 November 2026. It is open access under a CC BY licence: the full text is free to read at Figshare.
- Citations
- 1
- Most cited in
- 2026 (1)
- Field-weighted impact
- 1.32
- Authors
- 1
Abstract
Large Language Models (LLMs) have recently demonstrated strong performance in code generation tasks. However, because of knowledge cut-off limitations and the rapid evolution of software libraries, they frequently generate deprecated API usages, resulting in unreliable and incompatible code. Existing fine-tuning approaches are often inefficient when only a small portion of the model’s knowledge requires modification.Recent model-level techniques, including machine unlearning and model editing, provide a promising direction for updating parametric knowledge in LLMs. Nevertheless, their application to deprecated API mitigation remains largely underexplored. In addition, most existing methods focus mainly on suppressing outdated APIs without explicitly guiding models toward appropriate replacements, which can lead to mismatched or incomplete code generations.To address these limitations, we propose CURE, a contrastive unlearning framework that extends traditional unlearning beyond merely suppressing outdated knowledge by actively encouraging correct API replacements. Specifically, CURE jointly discourages deprecated APIs while promoting their valid alternatives, enabling LLMs to adapt more effectively to evolving software libraries.Experimental results on a recent deprecated API benchmark dataset demonstrate that CURE not only reduces deprecated API usage but also improves the accuracy of correct API replacement, while preserving general code generation capabilities. Furthermore, CURE substantially outperforms two state-of-the-art baselines across multiple evaluation metrics. These findings highlight the importance of combining suppression with explicit replacement guidance when adapting LLMs to continuously evolving software ecosystems.
Cite this paper
Formatted from the catalogue record. Check names, capitals and page numbers against the paper before you submit.
APA 7
Tran, H. N. (2026). Towards Knowledge Alignment in Code LLMs: Contrastive Unlearning for Evolving APIs}. Figshare. https://doi.org/10.6084/m9.figshare.32294028
MLA 9
Tran, Huy Ngoc. “Towards Knowledge Alignment in Code LLMs: Contrastive Unlearning for Evolving APIs}.” Figshare, 2026. https://doi.org/10.6084/m9.figshare.32294028.
Chicago
Tran, Huy Ngoc. 2026. “Towards Knowledge Alignment in Code LLMs: Contrastive Unlearning for Evolving APIs}.” Figshare. https://doi.org/10.6084/m9.figshare.32294028.
Harvard
Tran, H. N. (2026) ‘Towards Knowledge Alignment in Code LLMs: Contrastive Unlearning for Evolving APIs}’, Figshare. doi:10.6084/m9.figshare.32294028.
IEEE
H. N. Tran, “Towards Knowledge Alignment in Code LLMs: Contrastive Unlearning for Evolving APIs},” Figshare, 2026, doi: 10.6084/m9.figshare.32294028.
BibTeX
@article{tran2026towards,
title = {{Towards Knowledge Alignment in Code LLMs: Contrastive Unlearning for Evolving APIs}}},
author = {Tran, Huy Ngoc},
journal = {Figshare},
year = {2026},
doi = {10.6084/m9.figshare.32294028},
url = {https://doi.org/10.6084/m9.figshare.32294028}
}
Download for a reference manager: BibTeX (.bib) · RIS for Zotero, Mendeley and EndNote (.ris)
Topic and keywords
Physical Sciences › Computer Science › Information Systems › Software Engineering Research
- machine unlearning
- model editing
- code generation
- large language models
- cure
Work with this paper
Most-cited papers in Computer Science
- ImageNet classification with deep convolutional neural networksAlex Krizhevsky, Ilya Sutskever, Geoffrey E. Hinton · Communications of the ACM · 2017 · 114,726 citations
- Long Short-Term MemorySepp Hochreiter, Jürgen Schmidhuber · Neural Computation · 1997 · 109,097 citations
- A Mathematical Theory of CommunicationClaude E. Shannon · Bell System Technical Journal · 1948 · 91,736 citations
- Deep learningYann LeCun, Yoshua Bengio, Geoffrey E. Hinton · Nature · 2015 · 90,226 citations
- Faster R-CNN: Towards Real-Time Object Detection with Region Proposal NetworksShaoqing Ren, Kaiming He, Ross Girshick and 1 more · IEEE Transactions on Pattern Analysis and Machine Intelligence · 2016 · 74,143 citations
Questions about this paper
How do I cite this paper in APA style?
Tran, H. N. (2026). Towards Knowledge Alignment in Code LLMs: Contrastive Unlearning for Evolving APIs}. Figshare. https://doi.org/10.6084/m9.figshare.32294028
How many times has this paper been cited?
1 times, according to OpenAlex on 19 November 2026. Google Scholar and Scopus count different sets of sources, so their numbers differ.
Is this paper free to read?
Yes. It is open access at Figshare: sign in and open the full text from this page.
Who wrote this paper?
Huy Ngoc Tran.
What is the DOI of this paper?
10.6084/m9.figshare.32294028, permanently at https://doi.org/10.6084/m9.figshare.32294028. Sign in and open it from this page.
Bibliographic data from OpenAlex (CC0), last checked 19 November 2026. ResearchGuru does not host this paper; once you are signed in, the links open it at the publisher or the repository that does.