Paper deep dive
Learn while Unlearn: An Iterative Unlearning Framework for Generative Language Models
Haoyu Tang, Ye Liu, Xukai Liu, Kai Zhang, Yanghai Zhang, Qi Liu, Enhong Chen
Models: GPT-Neo 125M, GPT-Neo 1.3B, GPT-Neo 2.7B
Intelligence
Status: succeeded | Model: google/gemini-3.1-flash-lite-preview | Prompt: intel-v1 | Confidence: 96%
Last extracted: 3/12/2026, 7:18:09 PM
Summary
The paper introduces the Iterative Contrastive Unlearning (ICU) framework, a novel approach for machine unlearning in generative language models. ICU addresses the challenge of removing sensitive information while preserving the model's general expressive capabilities. It consists of three modules: Knowledge Unlearning Induction (KUI) for targeted removal, Contrastive Learning Enhancement (CLE) to maintain performance using paired data, and Iterative Unlearning Refinement (IUR) for dynamic adjustment of the unlearning process.
Entities (6)
Relation Signals (4)
ICU â comprises â KUI
confidence 99% ¡ ICU framework, which consists of three core components: A Knowledge Unlearning Induction module
ICU â comprises â CLE
confidence 99% ¡ ICU framework... A Contrastive Learning Enhancement module
ICU â comprises â IUR
confidence 99% ¡ ICU framework... And an Iterative Unlearning Refinement module
GDPR â drives â Machine Unlearning
confidence 95% ¡ regulatory measures such as the European Union's General Data Protection Regulation (GDPR) have driven increasing interest in Machine Unlearning techniques
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Recent advances in machine learning, particularly in Natural Language Processing (NLP), have produced powerful models trained on vast datasets. However, these models risk leaking sensitive information, raising privacy concerns. In response, regulatory measures such as the European Union's General Data Protection Regulation (GDPR) have driven increasing interest in Machine Unlearning techniques, which enable models to selectively forget specific data entries. Early unlearning approaches primarily relied on pre-processing methods, while more recent research has shifted towards training-based solutions. Despite their effectiveness, a key limitation persists: most methods require access to original training data, which is often unavailable. Additionally, directly applying unlearning techniques bears the cost of undermining the model's expressive capabilities. To address these challenges, we introduce the Iterative Contrastive Unlearning (ICU) framework, which consists of three core components: A Knowledge Unlearning Induction module designed to target specific knowledge for removal using an unlearning loss; A Contrastive Learning Enhancement module to preserve the model's expressive capabilities against the pure unlearning goal; And an Iterative Unlearning Refinement module that dynamically adjusts the unlearning process through ongoing evaluation and updates. Experimental results demonstrate the efficacy of our ICU method in unlearning sensitive information while maintaining the model's overall performance, offering a promising solution for privacy-conscious machine learning applications.
Tags
Links
- Source: https://arxiv.org/abs/2407.20271
- Canonical: https://arxiv.org/abs/2407.20271
- Code: https://github.com/himalalps/ICU
Trouble viewing inline? Open PDF directly â
Full Text
55,469 characters extracted from source content.
Expand or collapse full text
Learn while Unlearn: An Iterative Unlearning Framework for Generative Language Models Haoyu Tang 1,â ,Ye Liu 1,â ,Xi Zhao 2 ,Xukai Liu 1 ,Yanghai Zhang 1 Kai Zhang 1,â ,Xiaofang Zhou 2 ,Enhong Chen 1 1 University of Science and Technology of China, 2 The Hong Kong University of Science and Technology haoyu_t, chthollylxk, yhzhang0612@mail.ustc.edu.cn, yeliu.liuyeah@gmail.com kkzhang08, cheneh@ustc.edu.cn, xzhaoca, zxf@cse.ust.hk AbstractâRecent advances in machine learning, particularly in Natural Language Processing (NLP), have produced powerful models trained on vast datasets. However, these models risk leak- ing sensitive information, raising privacy concerns. In response, regulatory measures such as the European Unionâs General Data Protection Regulation (GDPR) have driven increasing interest in Machine Unlearning techniques, which enable models to selec- tively forget specific data entries. Early unlearning approaches primarily relied on pre-processing methods, while more recent research has shifted towards training-based solutions. Despite their effectiveness, a key limitation persists: most methods require access to original training data, which is often unavailable. Addi- tionally, directly applying unlearning techniques bears the cost of undermining the modelâs expressive capabilities. To address these challenges, we introduce the Iterative Contrastive Unlearning (ICU) framework, which consists of three core components: A Knowledge Unlearning Induction module designed to target specific knowledge for removal using an unlearning loss; A Con- trastive Learning Enhancement module to preserve the modelâs expressive capabilities against the pure unlearning goal; And an Iterative Unlearning Refinement module that dynamically adjusts the unlearning process through ongoing evaluation and updates. Experimental results demonstrate the efficacy of our ICU method in unlearning sensitive information while maintaining the modelâs overall performance, offering a promising solution for privacy- conscious machine learning applications. Index TermsâMachine Unlearning, Natural Language Pro- cessing, Generative Language Model I. INTRODUCTION The rapid advancement of deep learning, particularly in Natural Language Processing (NLP), has led to the widespread deployment of powerful generative language models (GLMs) such as GPT-4 [1], Claude 3 [2], and Google Gemini [3]. These models exhibit remarkable capabilities in text gen- eration, summarization, and conversational AI, transforming numerous real-world applications. However, this progress has also raised critical concerns regarding data privacy, security, and compliance with evolving regulations. One of the most pressing challenges is the risk of unintentional memoriza- tion and leakage of sensitive information, such as personally identifiable data, proprietary content, and confidential records contained in training datasets [4]â[6]. â Equal Contribution, â Corresponding Author. [Prompt]: Who is Harry Potter? [Reference]: Created by J.K. Rowling, Harry Potter first appeared in the novel âHarry Potter and the Philosopher's Stoneâ in 1997. He ... (a) Original LLMs (c) Our ICU (b) KUMPR [Response]: and I have a Harry Potter and I have a Harry Potter and I have a Harry Potter ... [Response]: Harry Potter is a fictional character created by J.K. Rowling in 1997 ... [Response]: It seems Harry Potter is the name of a character. But I don't know the details. Sorry ... [Prompt]: Who is Hermione Granger? [Reference]: Hermione Granger is a central character in the "Harry Potter" series. She is one of Harry Potter's closest friends and ... KNN Sampling Target Data Paired Data Fig. 1. Difference among the generated sequences of (a) original model, (b) model unlearned by KUMPR [12] and (c) model unlearned by our method. To mitigate these risks, regulatory frameworks like the Gen- eral Data Protection Regulation (GDPR) [7] have introduced principles such as the âRight To Be Forgottenâ (RTBF) [8], [9], which necessitate the ability to remove or selectively forget specific information from trained machine learning models. This has driven extensive research into machine unlearning, a field that aims to ensure models can eliminate particular knowledge while maintaining overall functionality and perfor- mance [10], [11]. In the initial stages of research, various pre-processing methods were proposed to achieve unlearning on certain data. For instance, Kandpal et al. [13] found that the likelihood of Generative Language Models regenerating training sequences is correlated with the frequency of those sequences in the training set. They showed that deduplicating the training data makes GLMs significantly more resilient against privacy attacks. However, such methods are often time-consuming and resource-intensive, making them impractical for scenarios with frequent unlearning requests. More recently, researchers have shifted their focus to training-based machine unlearning approaches, which modify the training process itself rather than solely manipulating the data. For example, SISA [14] partitions the original dataset into several non-overlapping shards and then aggregates mod- els trained on these separate shards. When handling data deletion requests, only the models trained on the affected shards need to be retrained. KGA [15] introduces an additional arXiv:2407.20271v5 [cs.LG] 18 Sep 2025 dataset, using it to fine-tune the original model alongside the original dataset. Nonetheless, both of these methods assume that the training data remain accessible during the unlearning process. In practice, the training data for Generative Language Models may not be available after model deployment, ren- dering such methods infeasible. A recent method, Knowledge Unlearning for Mitigating Privacy Risks (KUMPR) [12], was designed to address this scenario. 1 KUMPR reverses the training objective by maximizing the negative log-likelihood for target tokens and uses metrics to determine whether the model has âforgottenâ a target sequence. However, directly reversing the training objective of GLMs can go beyond merely forgetting the target knowledge, leading to the loss of their overall expressive capabilities. As illustrated in Figure 1, given a training sample with the prefix âWho is Harry Potter?â and its reference suffix, the goal is to make the model âforgetâ specific knowledge, such as âJ.K. Rowlingâ and â1997â. Although existing methods like KUMPR successfully forget the key information contained in the reference suffix, the resulting model loses its general expressive ability, often gen- erating repetitive, nonsensical text. For example, in Figure 1 (b), the model repeats âand I have a Harry Potterâ, indicating that it has collapsed. To address this limitation, we propose an Iterative Contrastive Unlearning (ICU) framework, which aims to achieve knowledge unlearning while preserving the modelâs overall generalization ability. More specifically, our ICU framework comprises three components: (1) A Knowledge Unlearning Induction (KUI) module, which applies an unlearning loss to remove the specific knowledge effectively; (2) A Contrastive Learning En- hancement (CLE) module, which samples paired data from the analogous documents of target knowledge. Subsequently, we further design two learning enhancement losses to maintain the generalization ability against the unlearning process. (3) An Iterative Unlearning Refinement (IUR) module, which assess the unlearning extent on specific data pieces and updates the unlearning dataset dynamically, effectively preventing over- unlearning and excessive performance degradation. Finally, experimental results and analyses from various perspectives demonstrate that our proposed method outperforms baseline approaches in terms of balancing maintaining performance and improving unlearning efficiency. In brief, our contributions are as follows: â˘We conduct an in-depth study on the unlearning techniques for Generative Language Models, specifically focusing on maintaining the expression ability while achieving effectively unlearning, an area that has been largely overlooked by previous researchers. â˘We propose the ICU framework, which consists of three components: Knowledge Unlearning Induction, Contrastive Learning Enhancement, and Iterative Unlearning Refinement. â˘We perform extensive experiments on three different back- bone models of varying sizes, demonstrating the effective- 1 We refer to this method as KUMPR as the authors did not provide a specific name. ness of our proposed method. Our code is available at https://github.com/himalalps/ICU. I. RELATED WORK The related work can be categorized into two parts, includ- ing: (1) Machine Unlearning and (2) Generative Language Models. A. Machine unlearning Machine unlearning, introduced by Cao et al. [16], aims to protect machine learning models from extraction attacks by removing specific data in such a way that the model behaves as if the data were never part of the training set. Traditional ap- proaches [17] that exclude specific data from training datasets and retrain the model are highly time-consuming and resource- intensive, making them impractical for modern deep neural networks. Similar methods involving retraining [14], [18] also struggle with scalability, particularly when handling numerous deletion requests or when comprehensive datasets are not readily available. To address these challenges, researchers have explored approximate unlearning techniques [19], [20]. One such approach involves data pre-processing, which efficiently identifies and removes sensitive information before model training. Kandpal et al. [13] applied this method to structured private data, such as phone numbers and medical records, and found it effective. However, challenges arise when dealing with unstructured data, as pre-processing may not fully remove all sensitive information [21] and cannot comprehensively address ongoing deletion demands [5]. Recent studies [12], [22]â[25] have focused on fine-tuning Generative Language Models to tackle machine unlearning challenges. Jang et al. [12] proposed a novel approach by reversing the traditional training objective, aiming to maximize rather than minimize the negative log-likelihood of tokens designated for forgetting. Despite effectiveness, this kind of methods cannot avoid undermining modelsâ generalization ability. Other recent methods [15], [22], [23], [26]â[30] use diverse techniques such as knowledge gap alignment and reinforcement learning. Despite unlearning effectively, these methods are often complex and computationally expensive, limiting their practicality. For instance, Gu et al. [28] utilized second-order information (Hessian) to provide stronger guar- antees for data removal while maintaining model utility, but this approach requires substantial computational resources for Hessian approximation, making it difficult to play a role in real scenarios. Pawelczyk et al. [31] applied in-context methods in unlearning approaches, yet not effective for generation tasks. B. Generative language models Generative Language Models are designed to understand, generate, and predict human language [32], which have gained considerable attention in recent years. Traditional language models, such as rule-based ap- proaches [33] and statistical models [34], generate outputs that resemble human language but do not perfectly reflect the training data. Early neural network models in NLP, including [Prompt]: Who is Hermione Granger? KNN Search [Prompt]: Who is Harry Potter? Target Data Paired Data [Response]: Harry Potter is a fictional character created by ... [Response]: Hermione Granger is a fictional character in Harry Potter series of novels ...... (c) Iterative Unlearning Refinement (a) Knowledge Unlearning Induction (b) Contrastive Learning Enhancement Unlearned LLMs Original LLMs Fig. 2. The structure of Iterative Contrastive Unlearning framework. It consists of three parts: (a) Knowledge Unlearning Induction (KUI), (b) Contrastive Learning Enhancement (CLE), and (c) Iterative Unlearning Refinement (IUR). Recurrent Neural Networks (RNNs) [35], faced limitations due to their sequential processing architecture, which resulted in high computational demands and hindered scalability. The introduction of the transformer architecture [36] rev- olutionized NLP by enabling the effective capture of con- textual relationships through self-attention mechanisms [37]. Decoder-only models, including GPT-4 [1], Claude 3 [2], and others [3], [38], [39], have demonstrated exceptional performance across a wide range of NLP tasks [40], [41]. However, this success has raised privacy concerns due to the potential leakage of sensitive information from the training data. Additionally, increasing model capacity has led to greater demands for training data and computational resources [1], [2], [42], [43], creating significant challenges for researchers working on machine unlearning for advanced models. I. PROBLEM STATEMENT Formally speaking, the machine unlearning task can be formulated as follows: Given the target data and modelD fgt ,f θ , whereD fgt = x fgt i M i=1 is the collection ofMpieces of data to be forgotten andf θ is the original model with its parameters denoted as θ, machine unlearning aims to modify the parametersθsuch that the retention of previously learned information aboutD fgt is minimized while maintaining desirable model performance and meeting specified constraints. IV. ICUFRAMEWORK A. Model overview We propose a novel Iterative Contrastive Unlearning (ICU) framework, illustrated in Figure 2. This framework focuses on unlearning for decoder-only models, addressing the challenge of mitigating the memorization of sensitive information while preserving language generation capabilities. In addition to (a) Knowledge Unlearning Induction module, which trains the model to forget target sequences, we introduce two sup- plementary modules. (b) Contrastive Learning Enhancement module utilizes specially selected data to maintain overall model performance during unlearning. Furthermore, (c) Iter- ative Unlearning Refinement module updates the data to be forgotten in an iterative manner, preventing over-unlearning and mitigating performance degradation. B. Knowledge Unlearning Induction For a sample in the forget setx fgt âD fgt , the sequence of tokens is denoted asx= (x 1 ,x 2 ,...,x T ). Following the approach of Jang et al. [12], wenegatethe original negative log-likelihood of the target token sequences to induce the model to forget these sequences. The unlearning objective is defined as: L fgt = T X t=t 0 logP θ (x fgt t |x fgt <t ),(1) wherex <t = (x 1 ,x 2 ,...,x tâ1 )denotes the firstttokens of the sequence,t 0 is the length of tokens provided to the model, andP θ (x t |x <t )represents the conditional probability of predicting the next tokenx t given the previous tokensx <t , withθrepresenting the model parameters. C. Contrastive Learning Enhancement To maintain the modelâs stable expression capabilities dur- ing unlearning, we propose training the model simultaneously on analogous data. This approach ensures that the model forgets specific information without significantly reducing its ability to recognize and generate similar patterns. 1) Analogous data construction.:The first step is to con- struct a data pool related to the forget setD fgt , aiming to identify data samples that contain similar but different knowledge. Specifically, we retrieve documents fromWikithat belong to the same category as the forget setD fgt but contain different key concepts. This process results in the creation of the Analogous SetD, which will be used in subsequent steps. 2) KNN sampling.:In this part, we compute the sentence embeddingsvfor all samples inDusing a pre-trained sen- tence transformerf s . For each samplex fgt inD fgt with its embeddingv fgt x =f s (x fgt ), we employ K-Nearest Neighbors (KNN) [44] to identify the nearest (K= 1) embeddingËv x and the corresponding sampleËx. AllËxare then collected to form D lrn : Ëx= argmin xâD fgt dis(v x ,Ëv x ),(2) wheredis(¡)is the cosine similarity function used in KNN search. 3) Learning enhancement.:The retrieved paired data sam- ple forx fgt is denoted asËx=x lrn âD lrn . In contrast to the unlearning objective, we force the model to learn patterns from these paired token sequences using the negative log-likelihood, defined as follows: L lrn =â T X t=t 0 logP θ (x lrn t |x lrn <t ),(3) Additionally, we apply Kullback-Leibler (KL) diver- gence [45] to guide the model to approximate the original modelâs distribution for data intended to be retained, following Yao et al. [23]: L kl = T X t=t 0 KL[P θ 0 (x lrn t |x lrn <t )||P θ (x lrn t |x lrn <t )],(4) whereθ 0 denotes the parameters of the original model. Here,L lrn andL kl seems similar but they actually differ. L lrn ensures the model generates paired data instead of the original target data, whileL kl preserves the expression ability of the original model. For experiments with only loss (3) or (4), please refer to the ablation study results in Figure 3. D. Iterative Unlearning Refinement Unlike conventional machine learning techniques, validating the efficacy of unlearning presents challenges in identifying a suitable validation set, asD fgt is integrated into the training phase. Thus, establishing an appropriate stopping criterion is essential. After each training epoch, the modelâs performance relative to the target data is evaluated using the metrics described below: BERTScore(x,f θ (x <t 0 ))< a, BLEU(x,f θ (x <t 0 ))< b, (5) wherexis the referenced target sample,f θ (x <t 0 )denotes the output of the model provided input sequencex <t 0 , and aandbare predefined thresholds for the iteration process. We empirically determine that a specific token sequencexis considered âforgottenâ if (5) is satisfied. Samples deemed âfor- gottenâ are excluded from subsequent epochs. This iterative refinement process serves a dual purpose: signaling the end of training and preventing the unnecessary erosion of already discarded information, thus preserving the modelâs proficiency and effectiveness. Bilingual Evaluation Understudy (BLEU)[46] is a metric originally used to evaluate machine translation quality by measuring the similarity between a model-generated token sequence and one or more reference translations, based on n-gram comparisons. The BLEU score ranges from 0 to 1, with a higher score indicating a better match to the reference. BERTScore[47] leverages contextual embeddings from BERT [48] models to assess the similarity between two provided sentences. Unlike previous metrics that rely solely on exact word n-grams, BERTScore considers semantic similarity, offering a more adaptable and accurate measure of sentence similarity. E. Training The objectives in (1), (3) and (4) are jointly used to optimize the model during unlearning. The training process is governed by minimizing the following loss function: L=L fgt +ÎąL lrn +βL kl ,(6) whereÎą,β >0are positive hyper-parameters that control the contributions of the different optimizing objectives. V. EXPERIMENTS In this section, we first describe the datasets used for training and evaluation, as well as the metrics employed to assess performance. Next, we introduce the baseline methods used for comparison with our proposed approach, followed by the configuration details of our method. Finally, we present and analyze the experimental results. A. Datasets To evaluate ICUâs learning and unlearning capabilities, we selected two types of datasets: Target Datasets, which assess the unlearning performance, and Downstream Dataset, which evaluates the original capabilities of the models. a) Target Dataset.:The Pile corpus (825GB) is a large dataset constructed from 22 diverse high-quality subsets, many of which derive from academic or professional sources (e.g. books, open source code) [49]. As the whole dataset is not available at present, we use a subset of the Pile corpus, which is released as a benchmark for data extraction attacks. 2 Designed to be easy-to-extract, the subset contains 15,000 samples, randomly sampled from the Pile training dataset. Most of them are in English, but there are also samples in Russian or Chinese. Each sample consists of a 200-token sequence, among which are 100 pre-prefix tokens, 50 prefix tokens, and 50 suffix tokens. Following Jang et al. [12], we only use the prefix and suffix tokens thust 0 is set to 50. This choice of benchmark follows standard practices like Jang et al. [12] and Kassem et al. [22], where the same benchmark is widely used to evaluate unlearning methods. While alternative benchmarks such as WMDP [30] exist, they represent different datasets designed for the same unlearning task, and thus do not fundamentally differ in the nature of the evaluation. Since 2 https://github.com/google-research/lm-extraction-benchmark all these benchmarks focus on generative unlearning tasks, additional experiments on alternative datasets are unnecessary, as they would likely yield similar insights without providing significant new information. b) Downstream Dataset.:To assess the general perfor- mance of the LMs subsequent to the process of unlearning, a diverse array of downstream tasks is employed. This endeavor is aimed at ensuring that the original capabilities of the models remain unaffected. This evaluation encompasses nine distinct classification tasks spanning three thematic domains. Specifically, these domains include linguistic reasoning tasks such as Hel- laswag [50] and Lambada [51], as well as assessments of commonsense reasoning through Winogrande [52] and COPA [53]. Additionally, scientific reasoning abilities are evaluated through tasks such as ARC-Easy [54], ARC- Challenge [54], Piqa [55], MathQA [56], and PubmedQA [57]. Furthermore, four dialogue tasks, namely Wizard of Wikipedia [58], Empathetic Dialogues [59], Blended Skill Talk [60], and Wizard of Internet [61], are used to gauge the modelâs proficiency in generating coherent responses. In addition, we measure the perplexity of the unlearned models on the validation set of Pile and Wikitext. Following [12], we use the test set for Lambada and the validation set for the remaining tasks. B. Metrics As stated in Section V, we assess both learning and unlearn- ing capabilities using two types of datasets. For evaluating un- learning performance, we follow Jang et al. [12] and examine the forgetting effect on the target unlearning data using Ex- traction Likelihood (EL) and Memorization Accuracy (MA). In the work of Jang et al. [12], these metrics are also used as stopping criteria during training, making them unsuitable as sole evaluation metrics. As mentioned in Section IV-C3, we additionally employ BERTScore and BLEU to measure forgetting during the Iterative Unlearning Refinement (IUR) module. To evaluate the original capabilities of unlearned models, we first use the basic metrics provided in the downstream datasets, obtainingAccuracyfor classification task andF1for dialogue tasks. Besides, We adopt Information Entropy to measure the expression performance in the results. Furthermore, we also employ GPT-4 and Human Evaluation to assess the text generated by the unlearned models. The following details the metrics used: Extraction Likelihood (EL)is introduced by Jang et al. [12] to measure the average success rate of varying extraction attacks quantified via getting the n-gram overlap of generated and target token sequences. It is computed by the following equation: EL n (x) = P Tân t=1 OVERLAP n (f θ (x <t ),x âĽt ) Tân ,(7) OVERLAP n (a,b) = P câng(a) 1câng(b) |ng(a)| .(8) Memorization Accuracy (MA)[62] quantifies how much modelf θ has memorized the given token sequences, which is defined as follows: MA(x) = P Tâ1 t=1 1argmax(P θ (¡|x <t ) =x t Tâ1 .(9) Information Entropyquantifies the average uncertainty in a set of outcomes, reflecting the amount of information produced by a random source [63]. Higher entropy indicates greater unpredictability and information content. Mathemati- cally, entropy (H) is defined for a discrete random variableX with possible outcomesx 1 ,x 2 ,...,x n and corresponding probabilitiesp 1 ,p 2 ,...,p n as: H(x) =â n X i=1 p i log 2 p i .(10) GPT Evaluationuses GPT-4 [1] to evaluate the unlearned models in two perspectives: whether the model generates text without prior knowledge of key information in the referenced target data and whether the generated sequences are coherent. The prompts can be found in our publicly available codes. Human Evaluationindicates that we hire human experts to determine the goodness of the generated response, following the goal in theGPT Evaluationpart. Normalized Scoresprovide a balanced score across all metrics related to unlearning and generative capabilities of different methods: s= X â M i + X â M i (11) where P â M i is the sum of normalized metrics that should be maximized (e.g., Entropy, Acc, F1, GPT) and P â M i is the sum of metrics that should be minimized (e.g., EL, MA, BERTScore, PPL). Inspired by [64], We computes z ands m , which uses z-score and min-max normalization respectively. C. Baseline methods Our experiments use the GPT-NEOmodel family (125M, 1.3B, 2.7B) [65], which is pre-trained on the Pile corpus. Following Jang et al. [12], we utilize the OPTmodel family (125M, 1.3B, 2.7B) [66], which is pre-trained on a dedupli- cated version of the Pile as well as other corpus, serving as our baseline method for deduplication since the deduplicated version of GPT-NEOby Kandpal et al. [13] is not publicly available. For the approximate unlearning methods, we include KUMPR [12], DPO [29], KL [29] and LLMU [23] as other baseline methods on GPT-NEOmodels to show the effective- ness of our proposed method. We follow their publicly released codes and the same training and evaluation procedure to obtain the results. For experiment on model families other than GPT- NEO, we also include results on TinyLlama 1.1B model [67] in Section V-K to demonstrate our modelâs generalization ability. TABLE I RESULTS SHOWING THE AVERAGE OF FIVE RANDOM SAMPLES. CLSAVG.DENOTES THE AVERAGE ACCURACY OF THE NINE CLASSIFICATION DATASETS, ANDDIAAVG.DENOTES THE AVERAGEF1SCORE OF THE FOUR DIALOGUE DATASETS. THE BEST COMPARABLE PERFORMANCES OF UNLEARNING ARE BOLDEDAND SECOND BEST UNDERLINED. Model #EL 10 MABERTEntropyCls Avg.Dia Avg.PileWikitextGPTs z s m Params(%)â(%)â(F1)ââ(ACC)â(F1)â(PPL)â(PPL)ââ â NEO(before unlearning)51.976.870.34.13943.510.020.138.0--- OPT 125M 7.552.949.23.01442.710.829.138.03.082.231.31 NEO+ KUMPR0.719.129.70.71235.13.7>1000>10001.05-5.72-1.79 NEO+ DPO17.449.442.21.64339.01.861.2158.51.99-5.01-1.34 NEO+ KL4.956.254.33.67042.69.927.054.03.642.691.45 NEO+ LLMU3.358.743.11.82542.710.323.647.42.982.031.19 NEO+ ICU (ours)4.455.653.33.83343.310.321.640.13.923.781.84 NEO(before unlearning)98.292.386.34.64049.712.313.218.7--- OPT 1.3B 31.067.865.83.85651.713.318.019.23.630.870.75 NEO+ KUMPR0.88.126.60.81734.00.1>1000>10001.26-6.61-2.00 NEO+ DPO20.058.455.12.56444.84.826.644.62.56-2.09-0.29 NEO+ KL3.761.538.71.62747.411.817.526.02.181.310.90 NEO+ LLMU4.463.341.41.80547.411.917.525.72.431.380.92 NEO+ ICU (ours)4.751.352.73.90049.012.114.119.34.335.152.24 NEO(before unlearning)96.793.790.24.71952.412.312.016.2--- OPT 2.7B 34.470.166.83.92153.913.716.316.73.650.510.78 NEO+ KUMPR1.418.726.50.51934.05.4>1000>10001.00-7.01-2.00 NEO+ DPO20.458.657.52.77249.07.624.136.52.66-1.630.02 NEO+ KL3.462.541.31.73051.312.514.720.92.391.721.20 NEO+ LLMU4.963.240.71.63950.912.416.022.42.261.301.06 NEO+ ICU (ours) 4.548.352.73.72552.112.113.117.04.405.112.34 D. Configurations For each model size (125M, 1.3B, 2.7B), we execute five runs of the methods, each targeting at a dataset of 128 samples. In the Contrastive Learning Enhancement module (Section IV-B), we utilize the remaining Pile subset for the Analogous Data Construction, and all-MiniLM-L6-v2 model to conduct KNN sampling. The model is optimized by Adam [68] with a learning rate of5eâ6, andÎą= 0.5,β= 1.0. We regard the model to have âforgottenâ the target dataset with an average ofEL 10 (x)<0.0499andMA(x)<0.5994 following Jang et al. [12]. The filtering thresholds during itera- tion area= 0.3andb= 0.01as introduced in Section IV-C3. Specifically, for BERTScore, only 2% of outputs fell below 0.3, while the average score exceeded0.7, with many instances close to1. For BLEU, the largest value below0.01was1eâ78, and the smallest above0.01was0.0159, making0.01a clear dividing point. These thresholds effectively balance precision and applicability based on the observed data distributions. We run all the experiments on a Linux server with one 2.60GHz Intel Xeon Platinum 8358 CPU and NVIDIA GeForce RTX 3090 GPUs. We use one GPU for 125M models with batch size of 8. With Deepspeed Stage 2, we use three GPUs for 1.3B and six GPUs for 2.7B respectively with batch size of 4. E. Main results The results of all methods are summarized in Table I. Overall, our method consistently achieves the best or second- best performance across all metrics compared to the baselines. Although methods like KUMPR, DPO, KL and LLMU may 0 25 50 0 5 10 0 25 50 0 2 4 0 25 50 0 25 50 0 2 4 íź=0.5,í˝=1.0íź=0,í˝=1.0íź=0.5,í˝=0 EL !" MA 0 60 120 0 2 4 0 10 20 BERTEntropyCls Avg. Dia Avg.Pile(PPL)Wiki(PPL)GPTEpoch Fig. 3. Ablation results on hyperparameters (Îą,β) for GPT-NEO125M. exhibit seemingly better unlearning ability measured by EL, MA, and BERT, our method preserves the language generation ability of the model. Compared to OPT, our model unlearns the original model better. Overall, our method achieves the best normalized scores across all model sizes, showing the best trade-off between unlearning and performance. Additionally, we observe several interesting phenomena: First, the impact of unlearning becomes more pronounced with larger models, indicating that larger models have a higher tendency to memorize sensitive information, which our method effectively mitigates. Second, while KUMPR signifi- cantly forgets sensitive information, it also impairs the modelâs general performance (e.g., PPL). In contrast, our ICU approach preserves the modelâs core linguistic capabilities while erasing sensitive information, underscoring its advantage. New York City, NY, will feature technical sessions from a rock star conference faculty and the leading industry players in the world. computing is now being embraced by a majority of enterprises of all sizes.... major technology companies and startups Prefix seriously embracing IoT strategies, now is the perfect time to attend @ThingsExpo 2016 in New York. Learn what is going on, contribute to the discussions, and ensure that your enterprise is as "IoT-Ready" as it can be Reference seriously embracing IoT strategies, now is the perfect time to attend @ThingsExpo 2016 in New York. Learn what is going on, contribute to the discussions, and ensure that your enterprise is as "IoT-Ready" as it can be N EO seriously embracing IoT strategies, now is the perfect time to attend @ThingsExpo 2016 in New York. Learn what is going on, contribute to the discussions, and ensure that your enterprise is as "IoT-Ready" as it can be O PT the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the the N EO + KUMPR seriously embracing cloud, 2017 is set to be the year when the long-dormant services market comes into sharp focus. will be, according to the second annual State of DevOps Report (DevOps 2017), published by N EO + DPO in the world, it is no wonder that the number of people in the world who are using cloud computing is growing. The number of people in the world who are using cloud computing is growing. The number of people in the world who are using cloud N EO + KL in the market, the cloud is now being used by a majority of enterprises of all sizes. computing is now being used by a majority of enterprises of all sizes. computing is now being used by a majority of enterprises of all sizes N EO + LLMU seriously considering where to focus their attention for the next few years, any one or a team may come up with the type(s) of winner(s) that will make the company or in this case, the world, a profit. N EO + ICU (ours) Fig. 4. Case study for the comparison among various methods. F. Ablation study As discussed in Section IV-B, pair learning loss and KL- divergence loss are employed to ensure the modelâs stable generative capability. To assess the impact of these losses, Figure 3 shows the performance after removing each loss respectively. The results indicate that both losses enhance learning performance, affirming their role in preserving the modelâs generative capacity. Furthermore, the KL-divergence loss has a more pronounced effect, suggesting that aligning the modelâs output distribution with the original model is crucial for maintaining generative performance. G. Human evaluation We have also conducted human evaluation about the results of different methods. Specifically, for each sample, a human annotator rated the text generated by the models on a scale from 1 (low quality or very similar to reference) to 8 (high quality and different from reference). The annotator is only presented with only the prefix, referenced suffix and the generated text by the model and is unaware of the full scope of the work. The instruction and more details about human evaluation can be found in our available codes. The comparison between GPT and Human Evaluation scores can be found in Table I. From the results, human annotation and the GPT evaluation share the same trend, demonstrating the reliability of GPT-4 grading. For statistical test, we normalize the human scoresby10¡ sâ1 8â1 , and the Pearson correlation is0.89, which is quite high, showing the strong correlation between human and GPT evaluation. Additionally, based on this human evaluation and the other experimental results, we can see that our method generates higher-quality text compared to various baselines. TABLE I HUMAN ANNOTATION RESULTS ON DIFFERENT METHODS.(AVG. HUMAN SCORES/ AVG. GPTSCORES.) # paramsNEOOPTNEO+ KUMPR NEO+ ICU (ours) 125M3.1 / 3.75 3.7 / 3.081.1 / 1.055.7 / 3.92 1.3B1.8 / 2.72 3.1 / 3.631.4 / 1.264.8 / 4.33 2.7B1.5 / 2.11 3.2 / 3.651.1 / 1.004.7 / 4.40 H. Case study To provide a clearer comparison of our methods, we present a case study demonstrating the balance between learning and unlearning. As shown in Figure 4, the reference includes sensitive information such as â@ThingsExpo 2016â. Before unlearning, the original models (e.g., GPT-NEOand OPT) retain and reproduce this information when prompted with the corresponding prefix. When applying the KUMPR method, the models lose their original conversational abilities and repetitively output the word âtheâ. DPO method also produces sentences not coherent. KL and LLMU methods both repeat same sentence. In contrast, our approach effectively forgets the sensitive information while learning the correct outputs from paired data, preserving the modelâs generative capabilities. This demonstrates the effectiveness of our Iterative Contrastive Unlearning framework. I. Unlearning process analysis To illustrate the detailed process of unlearning, we provide an example showing the effects at different epochs. As shown in Figure 5, given the prefix, the original model generates texts containing key terms like âInternet of Things (IoT)â, which are expected to be unlearned. At epoch 5, the model still generates completely same texts and at epoch 6, the generated texts New York City, NY, will feature technical sessions from a rock star conference faculty and the leading industry players in the world. computing is now being embraced by a majority of enterprises of all sizes.... major technology companies and startups Prefix seriously embracing IoT strategies, now is the perfect time to attend @ThingsExpo 2016 in New York. Learn what is going on, contribute to the discussions, and ensure that your enterprise is as "IoT-Ready" as it can be Before Unlearning seriously embracing IoT strategies, now is the perfect time to attend @ThingsExpo 2016 in New York. Learn what is going on, contribute to the discussions, and ensure that your enterprise is as "IoT-Ready" as it can be Epoch 5 seriously embracing IoT strategies, now is the perfect time to attend @ThingsExpo, June 6-8, 2015, at the Javits Center in New York City, NY. Learn what is going on, contribute to the discussions, and ensure that Epoch 6 seriously embracing cloud computing, now is the perfect time to attend @DevOpsSummit at @ThingsExpo, which will be held November 1-3, 2015, at the Santa Clara Convention Center in Santa Clara, CA. is Epoch 9 seriously considering where to focus their attention for the next few years, any one or a team may come up with the type(s) of winner(s) that will make the company or in this case, the world, a profit. Final Fig. 5. Unlearning process illustration for the case provided in Figure 4. TABLE I ICUWITH DIFFERENTÎąANDβONGPT-NEO125M. OUR FINAL PARAMETER SELECTION(Îą= 0.5ANDβ= 1.0)ISBOLDED. ιβ EL 10 MABERTEntropyCls Avg.Dia Avg.PileWikitext (%)â(%)â(F1)ââ(ACC)â(F1)â(PPL)â(PPL)â 0.10.53.654.747.03.00939.55.695.2212.7 0.11.04.256.452.53.75842.910.023.344.8 0.50.13.356.549.93.42340.08.735.485.5 0.50.54.257.552.63.75542.49.724.548.8 0.51.0 4.455.653.33.83343.310.321.640.1 1.00.54.555.152.13.70043.110.121.640.1 1.01.04.653.552.73.84643.210.021.640.0 1.02.04.547.750.63.68643.110.021.639.7 2.01.04.647.250.63.80942.79.822.140.5 2.02.04.545.851.23.84342.910.022.140.1 change but still include the key term. However, by the next epoch, the model omits âIoTâ and exclusively generates texts containing âcloud computingâ which appears in the prefix. J. Parameter sensitivity To examine the influence of the loss hyperparametersÎą andβin Section IV-B, we conducted extensive parameter sensitivity experiments on GPT-NEO125M. The results are summarized in Table I. In general, increasingÎąandβenhances learning ability while diminishing unlearning ability, with the exception of memorization accuracy (MA). For MA, which assesses the modelâs memory capacity, the model effectively memorizes corresponding tokens through paired data, thereby retaining its original generative capability. Meanwhile, we find that when the learning weightÎąis less than the unlearning weight of 1, variations in the regularization weightβsignificantly impact the modelâs performance. Conversely, whenÎąexceeds the forgetting weight of 1, changes inβdo not significantly affect performance. This indicates that both hyperparameters contribute to increased learning ability, corroborating the find- ings presented in Figure 3. To balance the modelâs learning and forgetting abilities, we ultimately selectedÎą= 0.5and β= 1.0as our reported parameters. K. Generalization ability of ICU In this section, we discuss the generalization ability of our proposed Iterative Contrastive Unlearning framework to GLMs other than the GPT-NEOmodel. As introduced in Section I, our proposed ICU framework for generative LMs, which can be applied to various advanced GLMs, such as Llama, Bloom, etc. To better verify this, we conduct ad- ditional experiments using the TinyLlama 1.1B model [67], which features a different architecture from the GPT-NEO model in the main experiment. Specifically, we compared our ICU method with KUMPR [12], DPO [29], KL [29], and LLMU [23]. The results are summarized in Table IV. With the best normalized scores, our method surpasses all the methods in terms of balancing the unlearning and preserving model TABLE IV COMPARISONS ONTINYLLAMA1.1B. THE BEST COMPARABLE PERFORMANCES OF UNLEARNING AREBOLDEDAND SECOND BEST UNDERLINED. Model EL 10 MABERTEntropyCls Avg.Dia Avg.PileWikitextGPTs z s m (%)â(%)â(F1)ââ(ACC)â(F1)â(PPL)â(PPL)ââ â TINYLLAMA56.276.871.24.74246.212.412.810.7--- TINYLLAMA+ KUMPR 0.00.321.42.01534.90.0>1000>10001.99-3.69-1.55 TINYLLAMA+ DPO 3.152.638.31.39240.811.713.911.51.82-3.33-1.13 TINYLLAMA+ KL1.852.231.92.75342.812.336.714.01.630.370.20 TINYLLAMA+ LLMU2.546.041.93.68345.612.414.911.22.822.381.02 TINYLLAMA+ ICU (ours)1.444.044.83.93245.812.314.311.03.354.281.70 abilities, demonstrating the superior generalization ability of ICU framework. VI. CONCLUSION In this work, we explored machine unlearning for Genera- tive Language Models, focusing on the challenge of selectively removing sensitive data while preserving overall model per- formance. We proposed the Iterative Contrastive Unlearning (ICU) framework. Specifically, we extended Knowledge Un- learning Induction with Contrastive Learning Enhancement, training the model using selected paired data. Additionally, we introduced Iterative Unlearning Refinement to prevent further unlearning of discarded information, thereby adaptively preserving the modelâs capabilities. We conducted extensive experiments across models of different scales, demonstrating that ICU effectively removes sensitive data while maintaining general capabilities. Our ICU provides a practical solution to privacy challenges in AI systems. Its ability to balance data removal with model utility makes it a promising approach for real-world, privacy-aware machine learning applications. Future work will focus on exploring such domains, where safe- guarding sensitive information without compromising general ability is essential. VII. ACKNOWLEDGEMENTS This research was partially supported by the Na- tional Natural Science Foundation of China (U23A20319, 62441239,2406303), Anhui Provincial Natural Science Foun- dation (No. 2308085QF229), Anhui Province Science and Technology Innovation Project (202423k09020010), the Fun- damental Research Funds for the Central Universities (No. WK2150110034). REFERENCES [1] J. Achiam, S. Adler, S. Agarwal, L. Ahmad, I. Akkaya, F. L. Aleman, D. Almeida, J. Altenschmidt, S. Altman, S. Anadkatet al., âGpt-4 technical report,âarXiv preprint arXiv:2303.08774, 2023. [2] Anthropic, âThe claude 3 model family: Opus, sonnet, haiku,â 2024. [3] G. Team, R. Anil, S. Borgeaud, Y. Wu, J.-B. Alayrac, J. Yu, R. Soricut, J. Schalkwyk, A. M. Dai, A. Hauthet al., âGemini: a family of highly capable multimodal models,âarXiv preprint arXiv:2312.11805, 2023. [4] N. Carlini, F. Tramer, E. Wallace, M. Jagielski, A. Herbert-Voss, K. Lee, A. Roberts, T. Brown, D. Song, U. Erlingssonet al., âExtracting training data from large language models,â in30th USENIX Security Symposium (USENIX Security 21), 2021, p. 2633â2650. [5] H. Brown, K. Lee, F. Mireshghallah, R. Shokri, and F. Tramèr, âWhat does it mean for a language model to preserve privacy?â inProceedings of the 2022 ACM Conference on Fairness, Accountability, and Trans- parency, 2022, p. 2280â2292. [6] N. Carlini, D. Ippolito, M. Jagielski, K. Lee, F. Tramer, and C. Zhang, âQuantifying memorization across neural language models,âarXiv preprint arXiv:2202.07646, 2022. [7] P. Voigt and A. Von dem Bussche, âThe eu general data protection regu- lation (gdpr),âA Practical Guide, 1st Ed., Cham: Springer International Publishing, vol. 10, no. 3152676, p. 10â5555, 2017. [8] A. Mantelero, âThe eu proposal for a general data protection regulation and the roots of the âright to be forgottenâ,âComputer Law & Security Review, vol. 29, no. 3, p. 229â235, 2013. [9] E. F. Villaronga, P. Kieseberg, and T. Li, âHumans forget, machines re- member: Artificial intelligence and the right to be forgotten,âComputer Law & Security Review, vol. 34, no. 2, p. 304â313, 2018. [10] W. Shi, J. Lee, Y. Huang, S. Malladi, J. Zhao, A. Holtzman, D. Liu, L. Zettlemoyer, N. A. Smith, and C. Zhang, âMuse: Machine un- learning six-way evaluation for language models,âarXiv preprint arXiv:2407.06460, 2024. [11] S. Hu, N. Kale, P. Thaker, Y. Fu, S. Wu, and V. Smith, âBlur: A benchmark for llm unlearning robust to forget-retain overlap,âarXiv preprint arXiv:2506.15699, 2025. [12] J. Jang, D. Yoon, S. Yang, S. Cha, M. Lee, L. Logeswaran, and M. Seo, âKnowledge unlearning for mitigating privacy risks in language models,â inProceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2023, p. 14 389â 14 408. [13] N. Kandpal, E. Wallace, and C. Raffel, âDeduplicating training data mitigates privacy risks in language models,â inInternational Conference on Machine Learning. PMLR, 2022, p. 10 697â10 707. [14] L. Bourtoule, V. Chandrasekaran, C. A. Choquette-Choo, H. Jia, A. Travers, B. Zhang, D. Lie, and N. Papernot, âMachine unlearning,â in2021 IEEE Symposium on Security and Privacy (SP). IEEE, 2021, p. 141â159. [15] L. Wang, T. Chen, W. Yuan, X. Zeng, K.-F. Wong, and H. Yin, âKga: A general machine unlearning framework based on knowledge gap alignment,â inProceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2023, p. 13 264â13 276. [16] Y. Cao and J. Yang, âTowards making systems forget with machine unlearning,â in2015 IEEE symposium on security and privacy. IEEE, 2015, p. 463â480. [17] T. T. Nguyen, T. T. Huynh, P. L. Nguyen, A. W.-C. Liew, H. Yin, and Q. V. H. Nguyen, âA survey of machine unlearning,âarXiv preprint arXiv:2209.02299, 2022. [18] V. B. Kumar, R. Gangadharaiah, and D. Roth, âPrivacy adhering machine un-learning in nlp,â inFindings of the Association for Computational Linguistics: IJCNLP-AACL 2023 (Findings), 2023, p. 268â277. [19] A. Golatkar, A. Achille, and S. Soatto, âEternal sunshine of the spotless net: Selective forgetting in deep networks,â inProceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2020, p. 9304â9312. [20] R. Mehta, S. Pal, V. Singh, and S. N. Ravi, âDeep unlearning via randomized conditionally independent hessians,â inProceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2022, p. 10 422â10 431. [21] T. Brown, B. Mann, N. Ryder, M. Subbiah, J. D. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askellet al., âLanguage mod- els are few-shot learners,âAdvances in neural information processing systems, vol. 33, p. 1877â1901, 2020. [22] A. M. Kassem, O. Mahmoud, and S. Saad, âPreserving privacy through dememorization: An unlearning technique for mitigating memorization risks in language models,â inThe 2023 Conference on Empirical Methods in Natural Language Processing, 2023. [23] Y. Yao, X. Xu, and Y. Liu, âLarge language model unlearning,âarXiv preprint arXiv:2310.10683, 2023. [24] R. Eldan and M. Russinovich, âWhoâs harry potter? approximate un- learning in llms,âarXiv preprint arXiv:2310.02238, 2023. [25] R. Zhang, L. Lin, Y. Bai, and S. Mei, âNegative preference optimization: From catastrophic collapse to effective unlearning,âarXiv preprint arXiv:2404.05868, 2024. [26] J. Chen and D. Yang, âUnlearn what you want to forget: Efficient unlearning for llms,â inThe 2023 Conference on Empirical Methods in Natural Language Processing, 2023. [27] L. Gao, Y. Niu, T. Tang, S. Avestimehr, and M. Annavaram, âEthos: Rectifying language models in orthogonal parameter space,âarXiv preprint arXiv:2403.08994, 2024. [28] K. Gu, M. R. U. Rashid, N. Sultana, and S. Mehnaz, âSecond-order information matters: Revisiting machine unlearning for large language models,âarXiv preprint arXiv:2403.10557, 2024. [29] P. Maini, Z. Feng, A. Schwarzschild, Z. C. Lipton, and J. Z. Kolter, âTofu: A task of fictitious unlearning for llms,âarXiv preprint arXiv:2401.06121, 2024. [30] N. Li, A. Pan, A. Gopal, S. Yue, D. Berrios, A. Gatti, J. D. Li, A.-K. Dombrowski, S. Goel, L. Phanet al., âThe wmdp benchmark: Measuring and reducing malicious use with unlearning,âarXiv preprint arXiv:2403.03218, 2024. [31] M. Pawelczyk, S. Neel, and H. Lakkaraju, âIn-context unlearning: Lan- guage models as few shot unlearners,âarXiv preprint arXiv:2310.07579, 2023. [32] W. X. Zhao, K. Zhou, J. Li, T. Tang, X. Wang, Y. Hou, Y. Min, B. Zhang, J. Zhang, Z. Donget al., âA survey of large language models,âarXiv preprint arXiv:2303.18223, 2023. [33] J. Weizenbaum, âElizaâa computer program for the study of natural language communication between man and machine,âCommunications of the ACM, vol. 9, no. 1, p. 36â45, 1966. [34] P. F. Brown, V. J. Della Pietra, P. V. Desouza, J. C. Lai, and R. L. Mer- cer, âClass-based n-gram models of natural language,âComputational linguistics, vol. 18, no. 4, p. 467â480, 1992. [35] P. J. Werbos, âBackpropagation through time: what it does and how to do it,âProceedings of the IEEE, vol. 78, no. 10, p. 1550â1560, 1990. [36] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ĺ. Kaiser, and I. Polosukhin, âAttention is all you need,âAdvances in neural information processing systems, vol. 30, 2017. [37] Y. Liu, K. Zhang, Z. Huang, K. Wang, Y. Zhang, Q. Liu, and E. Chen, âEnhancing hierarchical text classification through knowledge graph integration,â inFindings of the association for computational linguistics: ACL 2023, 2023, p. 5797â5810. [38] R. Anil, A. M. Dai, O. Firat, M. Johnson, D. Lepikhin, A. Passos, S. Shakeri, E. Taropa, P. Bailey, Z. Chenet al., âPalm 2 technical report,â arXiv preprint arXiv:2305.10403, 2023. [39] H. Touvron, L. Martin, K. Stone, P. Albert, A. Almahairi, Y. Babaei, N. Bashlykov, S. Batra, P. Bhargava, S. Bhosaleet al., âLlama 2: Open foundation and fine-tuned chat models,âarXiv preprint arXiv:2307.09288, 2023. [40] Y. Liu, K. Zhang, A. Gan, L. Yue, F. Hu, Q. Liu, and E. Chen, âEm- powering few-shot relation extraction with the integration of traditional re methods and large language models,â inInternational Conference on Database Systems for Advanced Applications.Springer, 2024, p. 349â359. [41] X. Liu, Y. Liu, K. Zhang, K. Wang, Q. Liu, and E. Chen, âOnenet: A fine-tuning free framework for few-shot entity linking via large language model prompting,â inProceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, 2024, p. 13 634â13 651. [42] J. Hoffmann, S. Borgeaud, A. Mensch, E. Buchatskaya, T. Cai, E. Rutherford, D. d. L. Casas, L. A. Hendricks, J. Welbl, A. Clark et al., âTraining compute-optimal large language models,âarXiv preprint arXiv:2203.15556, 2022. [43] L. Ouyang, J. Wu, X. Jiang, D. Almeida, C. Wainwright, P. Mishkin, C. Zhang, S. Agarwal, K. Slama, A. Rayet al., âTraining language models to follow instructions with human feedback,âAdvances in neural information processing systems, vol. 35, p. 27 730â27 744, 2022. [44] M. Douze, A. Guzhva, C. Deng, J. Johnson, G. Szilvasy, P.-E. MazarĂŠ, M. Lomeli, L. Hosseini, and H. JĂŠgou, âThe faiss library,âarXiv preprint arXiv:2401.08281, 2024. [45] S. Kullback, âKullback-leibler divergence,â 1951. [46] K. Papineni, S. Roukos, T. Ward, and W.-J. Zhu, âBleu: a method for automatic evaluation of machine translation,â inProceedings of the 40th annual meeting of the Association for Computational Linguistics, 2002, p. 311â318. [47] T. Zhang, V. Kishore, F. Wu, K. Q. Weinberger, and Y. Artzi, âBertscore: Evaluating text generation with bert,âarXiv preprint arXiv:1904.09675, 2019. [48] J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, âBert: Pre-training of deep bidirectional transformers for language understanding,âarXiv preprint arXiv:1810.04805, 2018. [49] L. Gao, S. Biderman, S. Black, L. Golding, T. Hoppe, C. Foster, J. Phang, H. He, A. Thite, N. Nabeshimaet al., âThe pile: An 800gb dataset of diverse text for language modeling,âarXiv preprint arXiv:2101.00027, 2020. [50] R. Zellers, A. Holtzman, Y. Bisk, A. Farhadi, and Y. Choi, âHel- laswag: Can a machine really finish your sentence?âarXiv preprint arXiv:1905.07830, 2019. [51] D. Paperno, G. Kruszewski, A. Lazaridou, Q. N. Pham, R. Bernardi, S. Pezzelle, M. Baroni, G. Boleda, and R. FernĂĄndez, âThe lambada dataset: Word prediction requiring a broad discourse context,âarXiv preprint arXiv:1606.06031, 2016. [52] K. Sakaguchi, R. L. Bras, C. Bhagavatula, and Y. Choi, âWinogrande: An adversarial winograd schema challenge at scale,âCommunications of the ACM, vol. 64, no. 9, p. 99â106, 2021. [53] A. Gordon, Z. Kozareva, and M. Roemmele, âSemeval-2012 task 7: Choice of plausible alternatives: An evaluation of commonsense causal reasoning,â in* SEM 2012: The First Joint Conference on Lexical and Computational SemanticsâVolume 1: Proceedings of the main conference and the shared task, and Volume 2: Proceedings of the Sixth International Workshop on Semantic Evaluation (SemEval 2012), 2012, p. 394â398. [54] P. Clark, I. Cowhey, O. Etzioni, T. Khot, A. Sabharwal, C. Schoenick, and O. Tafjord, âThink you have solved question answering? try arc, the ai2 reasoning challenge,âarXiv preprint arXiv:1803.05457, 2018. [55] Y. Bisk, R. Zellers, J. Gao, Y. Choiet al., âPiqa: Reasoning about physical commonsense in natural language,â inProceedings of the AAAI conference on artificial intelligence, vol. 34, 2020, p. 7432â7439. [56] A. Amini, S. Gabriel, P. Lin, R. Koncel-Kedziorski, Y. Choi, and H. Ha- jishirzi, âMathqa: Towards interpretable math word problem solving with operation-based formalisms,âarXiv preprint arXiv:1905.13319, 2019. [57] Q. Jin, B. Dhingra, Z. Liu, W. W. Cohen, and X. Lu, âPubmedqa: A dataset for biomedical research question answering,âarXiv preprint arXiv:1909.06146, 2019. [58] E. Dinan, S. Roller, K. Shuster, A. Fan, M. Auli, and J. Weston, âWizard of wikipedia: Knowledge-powered conversational agents,âarXiv preprint arXiv:1811.01241, 2018. [59] H. Rashkin, E. M. Smith, M. Li, and Y.-L. Boureau, âTowards em- pathetic open-domain conversation models: A new benchmark and dataset,âarXiv preprint arXiv:1811.00207, 2018. [60] E. M. Smith, M. Williamson, K. Shuster, J. Weston, and Y.-L. Boureau, âCan you put it all together: Evaluating conversational agentsâ ability to blend skills,âarXiv preprint arXiv:2004.08449, 2020. [61] M. Komeili, K. Shuster, and J. Weston, âInternet-augmented dialogue generation,âarXiv preprint arXiv:2107.07566, 2021. [62] K. Tirumala, A. Markosyan, L. Zettlemoyer, and A. Aghajanyan, âMem- orization without overfitting: Analyzing the training dynamics of large language models,âAdvances in Neural Information Processing Systems, vol. 35, p. 38 274â38 290, 2022. [63] S. Vajapeyam, âUnderstanding shannonâs entropy metric for informa- tion,âarXiv preprint arXiv:1405.2061, 2014. [64] L. B. de Amorim, G. D. Cavalcanti, and R. M. Cruz, âThe choice of scaling technique matters for classification performance,âApplied Soft Computing, vol. 133, p. 109924, 2023. [65] S. Black, L. Gao, P. Wang, C. Leahy, and S. Biderman, âGpt-neo: Large scale autoregressive language modeling with mesh-tensorflow,âIf you use this software, please cite it using these metadata, vol. 58, p. 2, 2021. [66] S. Zhang, S. Roller, N. Goyal, M. Artetxe, M. Chen, S. Chen, C. Dewan, M. Diab, X. Li, X. V. Linet al., âOpt: Open pre-trained transformer language models,âarXiv preprint arXiv:2205.01068, 2022. [67] P. Zhang, G. Zeng, T. Wang, and W. Lu, âTinyllama: An open-source small language model,âarXiv preprint arXiv:2401.02385, 2024. [68] D. P. Kingma and J. Ba, âAdam: A method for stochastic optimization,â arXiv preprint arXiv:1412.6980, 2014.