Source-linked AI summary

Forget to Know, Remember to Use: Context-Aware Unlearning for Large Language Models

Yuefeng Peng, Parnian Afshar, Megan Ganji, Thomas Butler, Amir Houmansadr, Mingxian Wang, Dezhi Hong

arXiv:2510.17620v2cs.CL

TL;DR

Existing evaluations of unlearning measure forgetting and retained utility but do not assess whether models can use removed knowledge when it is explicitly provided again. The paper adds a context-preserving term to unlearning objectives and reports restored contextual utility while maintaining forgetting effectiveness and model utility.

  • Problem

    Unlearning evaluations have focused on forgetting target knowledge and preserving retain-set utility, leaving contextual use of reintroduced knowledge insufficiently assessed.

    Source: §1 · pp. 1–2
  • Method

    The paper augments unlearning objectives with a plug-in KL-divergence term that aligns contextual responses from the unlearned model with those of the original model.

    Source: §1 · p. 2, §4.2 · p. 5, §5 · p. 6
  • Results

    Across multiple models and methods, existing unlearning often suppresses contextual use, while the augmentation restores it to near-perfect levels with comparable forgetting and preserved overall utility.

    Source: §7 · pp. 8–9
  • Takeaways & Limitations

    Unlearning design should account for context sensitivity in interactive and user-facing settings where removed knowledge may be supplied again.

    Source: §7 · p. 9

    When greater emphasis is placed on restoring contextual utility, some settings may have slightly weaker Direct QA forgetting, so the preferred balance depends on deployment priorities.

    Source: §8 · p. 9

Abstract

from arXiv · show

Large language models may encode sensitive information or outdated knowledge that needs to be removed, to ensure responsible and compliant model responses. Unlearning has emerged as an efficient alternative to full retraining, aiming to remove specific knowledge while preserving overall model utility. Existing evaluations of unlearning methods focus on (1) the extent of forgetting of the target knowledge (forget set) and (2) maintaining performance on the retain set (i.e., utility). However, these evaluations overlook an important usability aspect: users may still want the model to leverage the removed information if it is re-introduced in the prompt. In a systematic evaluation of six state-of-the-art unlearning methods, we find that they consistently impair such contextual utility. To address this, we augment unlearning objectives with a plug-in term that preserves the model's ability to use forgotten knowledge when it is present in context. Extensive experiments demonstrate that our approach restores contextual utility to near original levels while still maintaining effective forgetting and retain-set utility.

1. Introduction

Existing unlearning evaluations measure forgetting and retained utility but miss whether a model can use removed knowledge when it is reintroduced in context. The paper evaluates this contextual utility and adds a plug-in objective term intended to preserve it alongside forgetting and retain-set utility.

1. Introduction

  • Prior unlearning evaluations focus on forgetting the forget set and preserving retain-set utility, typically assessed through Direct QA.Existing methods generally perform well under this protocol, but it does not test use of externally reintroduced knowledge.Source: §1 · p. 1
  • Contextual utility is the ability to use removed knowledge when it is explicitly reintroduced in the input, a need in prompt- and retrieval-rich settings.The motivating examples include protected content that must be erased from model parameters but can still be legitimately supplied by users.Source: §1 · pp. 1–2
  • On Gemma-2B-IT with a 5% forget set, existing methods reduce Contextual QA performance by 15.5% to 100% relative to the pre-unlearning baseline.Across three unlearning methods and two models, the proposed augmentation restores contextual utility to near-perfect levels without loss in forgetting effectiveness or overall utility.Source: §1 · p. 2
  • The proposed context-aware objective adds a KL-divergence term aligning contextual responses from the unlearned model with those of the original model.The plug-in term is designed to integrate into existing unlearning algorithms with minimal modification.Source: §1 · p. 2

2. Related Work

Prior work develops approximate unlearning methods to avoid costly retraining and evaluates forgetting and retained utility, while leaving contextual use of externally supplied information less examined. The paper distinguishes its focus on parameter-updating unlearning from work using prompts or context to simulate or reverse unlearning.

2.1. LLM Unlearning

  • Unlearning aims to make a model behave as if it had not seen the forget subset while preserving utility on the remaining data.The target is performance on the forget set comparable to a model trained without that subset.Source: §2.1 · p. 2
  • Retraining on retained data can ensure forgetting and retention but is computationally impractical for large models and frequent removal requests.Approximate methods include gradient ascent, preference optimization, relabeling forget-set data, and activation perturbation; gradient ascent may cause catastrophic forgetting on unrelated data.Source: §2.1 · pp. 2–3
  • Prior evaluations generally test direct recall from the forget set and retained-set utility, leaving cases where relevant information is supplied externally untested.Earlier studies also suggest unlearning can suppress or obscure knowledge rather than fully remove it.Source: §2.1 · p. 3

2.2. The Role of Context in LLM Unlearning

  • Prior context-related work uses prompts to simulate unlearning or contextual cues to resurface forgotten knowledge, whereas this paper studies how parameter updates affect use of explicitly supplied forgotten knowledge.Prompt-based designs may be scenario-specific and may not generalize across use cases; the paper describes its question as orthogonal to those approaches.Source: §2.2 · p. 3

3. Revisiting and Measuring Existing Unlearning Methods

Across the evaluated methods, unlearning degrades Contextual QA even when forgotten knowledge is supplied in the prompt, though the size of the degradation varies by method and model. The evaluation uses TOFU, two instruction-tuned models, direct and contextual question answering, and a qualitative case study.

Setup

  • The experiments use TOFU fictitious author profiles, with forget-set proportions of 1%, 5%, and 10%, and evaluate Gemma-2B-IT and Qwen3-8B.The default forget-set proportion is 5%; hyperparameter tuning follows TOFU settings but increases training from 5 to 20 epochs.Source: §3 · p. 3

Evaluation Tasks and Metrics

  • Direct QA tests recall without added context, while Contextual QA supplies removed knowledge in the prompt to test whether the model can use external evidence.The evaluation reports ROUGE-L, LLM-Judge, and model utility; higher answer-quality metric scores are better, and utility measures performance on non-forget-set data.Source: §3 · pp. 3–4

Findings

  • On Gemma-2B-IT, RMU, GradAscent, and GradDiff reduce Contextual QA performance to nearly zero; on Qwen3-8B, all but UNDIAL cause drops of 13.4% to 100%.NPO and UNDIAL preserve Gemma performance better but still drop by over 15.5%; UNDIAL preserves contextual utility better across both models, while being less effective than RMU and NPO at eliminating undesirable Direct QA responses.Source: §3 · p. 4, Figure 2 · p. 4
  • UNDIAL’s relabeling approach is associated with better contextual preservation than methods that penalize the forget set, but it is less effective at eliminating undesirable Direct QA responses.The authors attribute the difference to relabeling toward new targets rather than directly suppressing target knowledge.Source: §3 · p. 4

Case Study

  • In a randomly selected forget-set example, five of six methods fail to answer correctly despite the correct answer being supplied in context.The case-study outputs range from nonsensical text to hallucination; UNDIAL succeeds in this example but still degrades overall Contextual QA performance.Source: §3 · pp. 4–5

4. Context-Aware LLM Unlearning

Existing objectives penalize forget-set behavior and may suppress use of the same information when it is reintroduced as context. This section adds a context term that aligns contextual behavior with the original model while retaining forgetting and retain-set objectives.

4.1. Revisiting Existing Objectives

  • Existing methods penalize behavior on the forget set and may propagate that penalty into inference-time conditioning, suppressing contextual utility.They generally use a forget term and optionally a retain term.Source: §4.1 · p. 5

4.2. Our Context-Aware Objective

  • The proposed formulation adds a context term that rewards correct responses when forgotten knowledge returns as external evidence, alongside forget and retain terms.The hyperparameters λf, λr, and λc balance forgetting, retention, and contextual preservation.Source: §4.2 · p. 5
  • KL-consistency aligns contextual responses with the original model; the context term is modular and targets behavior relative to the pre-unlearning model.The authors distinguish this targeted remedy from improving absolute grounding, which would require additional supervision such as teacher distillation or gold answers.Source: §4.2 · pp. 5–6
  • Anchoring contextual distributions to the original model separates “do not recall from memory” from “do use when provided” and is stable to λc.The authors report this works without compromising forgetting or retain-set utility.Source: §4.2 · p. 6

5. Experiments

Across three unlearning methods and two models, context-aware variants substantially improve contextual QA while largely preserving forgetting and model utility. The experiments also report consistent trends on PISTOL and illustrative recovery of contextual facts in a case study.

Setup

  • The experiments extend RMU, NPO, and UNDIAL on Gemma-2B-IT and Qwen3-8B, reporting each method’s earliest converged epoch across Direct and Contextual LLM-Judge scores and model utility.The reported settings use method- and model-specific λc values.Source: §5 · p. 6

Evaluation Scope

  • The same trends are observed on PISTOL, a dataset with structurally entangled entities and relational dependencies.Source: §5 · p. 6

Results

  • Direct QA changes average ~4 percentage points in ROUGE-L and ~2 percentage points in LLM-Judge; mean Model Utility shifts are −0.01 on Gemma and 0.0 on Qwen.The authors characterize the effects on forgetting and utility as marginal and largely neutral.Source: §5 · p. 6, Table 2 · p. 7

Case Study

  • In the Gemma-2B-IT case study, context-aware RMU, NPO, and UNDIAL recover the gold fact, unlike vanilla methods that hallucinate or produce unintelligible text.The case study uses one representative example with explicit, correct context.Source: §5 · p. 6, Table 3 · p. 7

Results

  • ≥0.95 Contextual QA LLM-Judge across methods and both models; RMU reaches ≥0.97 on Gemma and Qwen, with Contextual QA ROUGE-L 0.91 and 0.67, respectively.Context-aware variants are compared with vanilla methods on the 5% forget set.Source: §5 · p. 6, Table 2 · p. 7

6. Discussion

Across forget ratios, context-aware variants preserve contextual utility while matching their original methods on forgetting and model utility. They also succeed across paraphrased and reasoning-based contexts, and improve performance in noisier or conflicting contexts while preserving forgetting and utility.

6.1. Ablation on Forget Set Size

  • Across 1%, 5%, and 10% forget ratios, context-aware variants preserve contextual utility near the ideal level while matching vanilla methods on Direct QA forgetting and model utility.Vanilla NPO, RMU, and UNDIAL reduce contextual utility; RMU falls to zero, while NPO and UNDIAL also drop substantially.Source: §6.1 · pp. 7–8, Figure 4 · p. 8

6.2. Robustness to Context Variants

  • For RMU, the context-aware variant answers correctly in all three contextual settings while retaining incorrect answers in Direct QA; vanilla RMU fails in every setting.The contextual settings provide the correct answer verbatim, paraphrased, or through information requiring simple reasoning.Source: Table 4 · p. 7, §6.2 · p. 8
  • With longer noisy contexts, conflicting spans, or multiple distractors, contextual performance decreases, but context-aware unlearning still substantially improves it while preserving forgetting and model utility.These settings embed evidence in GPT-generated paragraphs or add conflicting content.Source: §6.2 · p. 8

7. Conclusion

The paper finds that state-of-the-art unlearning often suppresses the ability to use removed information when it is supplied in the prompt. Context-aware variants preserve this contextual capacity while retaining comparable forgetting effectiveness and overall model utility.

7. Conclusion

  • State-of-the-art unlearning often suppresses models’ ability to use removed information, even when the correct answer is explicitly provided in the prompt.The paper calls this ability contextual utility.Source: §7 · p. 8
  • Context-aware variants explicitly preserve the ability to reason over user-provided context while achieving comparable forgetting effectiveness and preserving overall model utility.The paper presents these variants as a response to contextual degradation after unlearning.Source: §7 · pp. 8–9
  • The findings highlight context sensitivity as an important consideration for unlearning techniques in interactive and user-facing deployments.Source: §7 · p. 9

8. Limitations

Context-aware unlearning can trade stronger contextual utility for slightly weaker Direct QA forgetting in some settings. The evaluation is primarily limited to TOFU and PISTOL benchmarks and models up to 8B parameters; broader settings and theoretical analysis remain future work.

8. Limitations

  • Greater emphasis on restoring contextual utility can come with slightly weaker Direct QA forgetting, so the preferred balance depends on deployment priorities.The paper contrasts stricter removal scenarios with RAG or user-document settings.Source: §8 · p. 9
  • The evaluation is primarily based on TOFU and PISTOL benchmarks and models up to 8B parameters due to computational constraints.Source: §8 · p. 9
  • Further evaluation in long-context RAG, multi-document inputs, multi-turn conversations, and larger models is left for future work.Source: §8 · p. 9
  • Further theoretical analysis is identified as an important direction for future work.Source: §8 · p. 9

Impact Statement

The paper aims to improve the evaluation and design of LLM unlearning by addressing failures to use legitimately supplied context after unlearning. Its experiments use public benchmarks and open-weight models, without real personal data.

Impact Statement

  • The work aims to improve LLM unlearning evaluation and design by addressing failures to use legitimately provided contextual information after unlearning.Source: Impact Statement · p. 9
  • Experiments use public benchmarks and open-weight models and do not involve real personal data.Source: Impact Statement · p. 9
  • The authors expect a positive societal impact through support for responsible model behavior, while noting possible misapplication in other contexts.Source: Impact Statement · p. 9

A.1.1. TRAINING SETUP

The appendices test whether context-aware unlearning remains effective across forget-set ratios, related data, methods, metrics, and increasingly difficult contexts. Across these settings, contextual performance improves while forgetting and model utility are generally maintained, with some boundaries and trade-offs identified.

A.2. Human Agreement with LLM-Judge; A.7. Additional Evaluation Metrics; A.8. Additional Baseline Results

  • LLM-Judge agrees strongly with human evaluation, while additional metrics on Qwen3-8B and four additional Gemma-2B-IT baselines show contextual gains with comparable forgetting and utility.The additional baselines are DPO, GradDiff, PDU, and SimNPO.Source: §A.2 · p. 12, Table 5 · p. 12, §A.7 · p. 16

A.3.1. DIRECT QA RESULTS; A.3.2. CONTEXTUAL QA RESULTS AT OTHER FORGET RATIOS

  • Direct QA suppressed gold answers after unlearning, while Contextual QA remained impaired at both 1% and 10% forget ratios.UNDIAL showed weaker forgetting than other methods and scores above the retrain-on-retain baseline, suggesting under-unlearning.Source: §A.3.1 · p. 13, Table 6 · p. 13, §A.3.2 · p. 13

A.4. Evaluation on Structurally Entangled Data

  • In PISTOL’s structurally entangled data, unlearning A–C is easier than A–B, while context-aware variants improve Contextual QA and maintain comparable Direct forgetting.The A–B edge connects a larger set of entities.Source: §A.4 · p. 14, Table 7 · p. 16

A.5. More Discussions on Existing Unlearning Objectives

  • Across GD, NPO, and RMU, forgetting terms alter outputs or internal representations beyond direct answers, suppressing use of reintroduced facts as context.The discussion links these effects to contextual degradation.Source: §A.5 · pp. 14–15

A.6. Convergence and λc Selection

  • Contextual performance is largely insensitive to λc: multiple settings improve it while forgetting and utility remain stable, supporting practical selection across deployment goals.The selection procedure chooses for contextual QA and utility while keeping Direct QA forgetting within δ = 0.06 of vanilla.Source: §A.6 · p. 16, Figure 9 · p. 17

A.10. Robustness Under Longer and Noisy Contexts

  • On long, noisy contexts, RMU’s contextual LLM-Judge score rises from 0.010 to 0.605, while context-aware unlearning maintains comparable forgetting and utility.Standard unlearning substantially reduces contextual QA performance in this setting.Source: §A.10 · pp. 18–19, Table 11 · p. 18

A.11. Mixed-Context Evaluation

  • More than +0.79 ROUGE-L and +0.64 LLM-Judge in some cases: context-aware variants improve mixed-context performance, while vanilla methods often miss the correct evidence.The mixed context includes both ground-truth evidence and a plausible, conflicting distractor.Source: Table 12 · p. 19, §A.11 · p. 19

A.11.1. EFFECT OF THE NUMBER OF DISTRACTORS IN CONTEXT

  • As conflicting distractors increase, Gemma-2B-IT contextual QA performance declines across methods, while context-aware variants outperform vanilla; RMU gains +0.54 LLM-Judge at k = 2.Source: Table 13 · p. 19, §A.11.1 · p. 19
Loading 2510.17620v2…