---
title: Selective Forgetting in Deep Learning
url: https://www.emergentmind.com/topics/selective-forgetting
type: topic
---

# Selective Forgetting in Deep Learning

Searching arXiv for recent and foundational papers on selective forgetting to ground the article.
Selective forgetting denotes the targeted removal, suppression, or attenuation of specific information while preserving other capabilities, memories, or task performance. Across contemporary research, the term covers class-level adaptation of pre-trained models, span-level unlearning in language models, weight-level scrubbing against white-box probes, replay reweighting in federated continual learning, geometry-aware mitigation of primacy bias in deep reinforcement learning, and selective pruning of external memory in agents and robots [2411.00409][2402.05813][1911.04933][2502.14205][2502.00802][2604.20300][2604.11306]. Earlier cognitive work used the same term for the observation that forgetting is more pronounced on the lexical level of tags than on the semantic level of latent topics, establishing a “words versus meaning” distinction that remains influential in later computational formulations [1402.0728].

## 1. Conceptual scope and formal problem settings

Selective forgetting is not a single task but a family of deletion problems that differ in granularity, access assumptions, and target behavior. In the strongest white-box formulation for deep networks, the original training set is split as \(D = D_r \sqcup D_f\), and a scrubbing function \(S\) is sought such that any readout function of the scrubbed weights is indistinguishable from the same function applied to a model trained without \(D_f\). This is formalized by a KL objective over readout distributions, together with a utility-aware “Forgetting Lagrangian” that trades off retained-data loss against divergence from the retrained-without-\(D_f\) distribution [1911.04933].

Later work broadens this sample-level view. In black-box selective forgetting for CLIP-like pre-trained models, the forget set is a subset of class labels and the retain set is its complement; success means making the model unable to recognize the forgotten classes while maintaining accuracy on the remaining classes [2411.00409]. In language models, SeUL moves from instance-level deletion to token-span deletion: for each forget sequence \(x\), a forget span set \(s^x\) specifies which contiguous subsequences should be unlearned, so that only the sensitive spans, rather than the entire sequence, are targeted [2402.05813]. A finer-than-sample formulation goes further by introducing four datasets—\(D_r\), \(D_f\), \(D_{f,\mathrm{clean}}\), and \(D_{r,\mathrm{extra}}\)—to distinguish whether unwanted information is present and whether it is available during forgetting, thereby supporting backdoor-style and shortcut-style forgetting rather than coarse sample removal [2012.11849].

A distinct but related antecedent appears in social tagging. There, selective forgetting refers to a differential decay pattern across representational levels: semantic or “gist traces” remain relatively stable, whereas lexical or “verbatim traces” decay more strongly over time. The corresponding recommender formulations, \(3LT_{topic}\) and \(3LT_{tag}\), operationalize forgetting on the topic level or the tag level, with empirical evidence favoring lexical-level forgetting [1402.0728]. This suggests that selective forgetting can also mean uneven forgetting across layers of representation rather than explicit deletion requests.

## 2. Weight-, gradient-, prompt-, and operator-space mechanisms

One major line of work implements selective forgetting directly in parameter space. In deep networks, scrubbing is derived from local quadratic approximations and SGD stability. The exact quadratic-case map reduces, near convergence, to a noisy Newton-like deletion update,
\[
S_t(w)= w - B^{-1}\nabla L_{D_f}(w) + (\lambda\sigma_h^2)^{\frac14} B^{-1/4}\epsilon,
\]
with \(\epsilon \sim \mathcal N(0,I)\), and the practical “Fisher forgetting” variant uses anisotropic noise shaped by the Fisher Information Matrix to hide residual information while preserving retained-data utility [1911.04933]. In deep reinforcement learning, this idea is adapted into Fisher-Guided Selective Forgetting, which interprets primacy bias as over-retention of early replayed experience and applies a Fisher-preconditioned stochastic scrub,
\[
S(w)=w+(\lambda\sigma^2)^{1/4}F^{-1/4}\epsilon,
\]
periodically during SAC training [2502.00802].

A related geometry-based optimizer appears in continual learning. Selective Forgetting-Aware Optimization defines an update
\[
u_t =
\begin{cases}
g_t, & s_t > \lambda_{\text{accept}} \\
(I-P_{\mathcal S})g_t, & \lambda_{\text{proj}} < s_t \le \lambda_{\text{accept}} \\
0, & s_t \le \lambda_{\text{proj}},
\end{cases}
\]
where \(s_t\) is a sampled maximum cosine alignment between the current gradient and stored past gradients. The update is therefore accepted, projected, or discarded depending on similarity, and the paper explicitly frames this as controlled forgetting rather than blanket preservation [2603.26671].

Black-box settings replace parameter editing with prompt-space control. In “Black-Box Forgetting,” the only trainable object is a prompt representation. Retention uses cross-entropy,
\[
\mathcal{L}_{\mathrm{memorize}}(\mathbf p,\mathbf t,C)= -\sum_{i=0}^{C-1} t_i \log p_i,
\]
while forgetting uses an entropy-maximizing objective,
\[
\mathcal{L}_{\mathrm{forget}}(\mathbf p,C)= -\frac{1}{C}\sum_{i=0}^{C-1}\log p_i,
\]
so forgotten-class outputs become as close to random as possible. The paper’s main technical device, Latent Context Sharing, factorizes prompt latents into shared and token-specific components to make derivative-free CMA-ES search feasible [2411.00409]. In language-model unlearning, SeUL similarly modifies the objective rather than the architecture: it minimizes positive log-probability only over sensitive forget spans,
\[
\mathcal{L}_{UL}(A(D),x)=\sum_{s_i\in s^x}\sum_{t=j_i}^{j_i+|s_i|-1}\log p_\theta(x_t\mid x_{<t}),
\]
thereby lowering probability on selected tokens without reversing training on the whole example [2402.05813].

Selective forgetting has also been extended beyond neural-network classification and generation. In nonlinear least-squares option calibration, forgetting a quote subset \(F\) is implemented as an operator downdate of the Gauss–Newton system,
\[
H' = H - \sum_{i\in F}\psi_i,\qquad
G' = G - \sum_{i\in F}u_i,
\]
followed by
\[
(H' + \lambda I)\Delta\theta' = G',\qquad \theta'=\theta^{\mathrm{ref}}+\Delta\theta'.
\]
At a fixed linearization, this is locally exact relative to retraining on \(D\setminus F\) [2511.14980].

## 3. Replay-, memory-, and surrogate-based forgetting

Another large family of methods operates through replay, rehearsal, or memory management rather than direct parameter scrubbing. In heterogeneous federated continual learning, AF-FCL argues that preserving all previous knowledge is not always beneficial because replay can carry biased features, spurious correlations, and noisy information across clients. It therefore weights replay samples by a credibility score
\[
p_{D_k^t}(\bar u_i),
\]
estimated from a normalizing-flow latent distribution of the current task, so that low-credibility replay contributes less to the classification loss [2502.14205].

In deep generative models, Selective Amnesia derives forgetting from continual-learning principles. The forgotten concept is redirected toward a user-specified surrogate distribution \(q(x\mid c_f)\), while retained concepts are preserved by generative replay and an EWC-style Fisher penalty. The resulting objective
\[
\mathcal L
=
\mathbb E_{q(x\mid c)p_f(c)}[\log p(x\mid \theta,c)]
-\lambda \sum_i \frac{F_i}{2}(\theta_i-\theta_i^*)^2
+\mathbb E_{p(x\mid c)p_r(c)}[\log p(x\mid \theta,c)]
\]
makes forgetting controllable: a celebrity prompt can be remapped to “a middle aged man,” and nudity can be remapped to “a person wearing clothes,” rather than merely collapsed into noise [2305.10120].

At the level of online memory dynamics, selective forgetting can emerge from structured rehearsal. In the Perpetual Learning Machine, memories recalled with probabilities \(99\%\), \(1\%\), and \(0\%\) exhibit graded retention under Perpetual Stochastic Gradient Descent: the frequently recalled group stays near zero error, the rarely recalled group rises to a higher-error homeostatic state, and the unrecalled group deteriorates without leveling off [1509.03185]. In real-time RBF learning, SMRLS replaces global forgetting factors with a partition-based memory objective,
\[
J_S(W,k)= \sum_{j=1}^{M_P(k)} \|\varphi_j(k)-W^T\Phi(\gamma_j(k))\|^2 +(W-W_0)^T P_0^{-1}(W-W_0),
\]
thereby retaining one synthesized representative per visited input-space partition instead of exponentially downweighting all old samples [2211.07909].

Selective forgetting can also be induced by introducing a competing task. In watermark removal, Attention Distraction defines a lure classification loss plus attention anchoring,
\[
\mathcal L_{AD}=\mathcal L_\delta+\mathcal L_{AA},
\]
where the model is first aligned to its original behavior on proxy data and then distracted toward a new lure class. The intended result is retention of the main task with forgetting of the watermark task [2204.01934].

## 4. External memory, agents, robots, and in-context suppression

In agent systems with externalized memory, selective forgetting becomes a systems capability rather than a weight update. FSFM organizes memory into sensory, working, and long-term layers, and models passive forgetting with
\[
\mathrm{Retention}(t)=e^{-\lambda t},
\]
extended by multi-factor modulation and a weighted importance score,
\[
\mathrm{Importance\ Score}
=
\alpha\cdot \mathrm{CQA}
+\beta\cdot \mathrm{BVE}
+\gamma\cdot \mathrm{TRS}
+\delta\cdot \mathrm{SRC}.
\]
Forgetting is then implemented through passive decay, active deletion, safety-triggered deletion, and adaptive reinforcement, under a capacity-constrained pruning objective over memory records [2604.20300]. FadeMem develops a related but more explicitly continuous memory-strength model for LLM agents. Each memory item stores content, text, strength, timestamp, and frequency, and decays according to
\[
v_i(t)=v_i(0)\cdot \exp\!\left(-\lambda_i \cdot (t-\tau_i)^{\beta_i}\right),
\qquad
\lambda_i=\lambda_{\mathrm{base}}\cdot \exp(-\mu\cdot I_i(t)),
\]
with long-term and short-term layers, reinforcement on access, contradiction suppression, and LLM-guided fusion of semantically related memories [2601.18642].

Robotic episodic memory introduces another variant. H\(^2\)-EMV incrementally constructs a hierarchical history tree and assigns each node an expiration time
\[
\tau_n = t_{\mathrm{end}} + \Delta t_\ell \cdot \gamma_\ell,
\]
with level-dependent lifetime scaling. When a node expires, an LLM estimates a relevance factor \(\alpha\), extends its lifetime by \(\alpha\cdot \Delta t_\ell\), and forgets it if it remains expired. Relevance is conditioned on learned natural-language rules derived from user feedback, so forgetting is explicitly personalized [2604.11306].

A different form of selectivity is inference-time suppression. In-context knowledge unlearning marks target knowledge with `<<UNL>> ... <</UNL>>` tokens and fine-tunes the model with a forgetting loss
\[
L_{\mathrm{forget}}(\theta) = -\sum_i \log P_\theta(\text{`forgot'}\mid u_i,q_i)
\]
and a retention loss
\[
L_{\mathrm{retain}}(\theta) = -\sum_i \log P_\theta(r_i\mid u_i,q_i).
\]
The model then answers normally unless the current query depends on the marked target knowledge, in which case it emits “forgot” [2410.00382].

## 5. Evaluation protocols and empirical regularities

Selective forgetting is evaluated through markedly different protocols depending on the regime.

| Setting | Typical metrics or protocol | Representative papers |
|---|---|---|
| Black-box class forgetting | \(Err_{\mathrm{for}}\), \(Acc_{\mathrm{mem}}\), harmonic mean \(H\) | [2411.00409] |
| Span-level LM unlearning | \(EL_{10}\), \(MA\), \(S\text{-}EL\), \(S\text{-}MA\) | [2402.05813] |
| Multimodal benign forgetting | ROUGE-L, Fact Score, Meaningful Score on S-MLLMUn Bench | [2511.20196] |
| Privacy auditing of unlearning | membership inference, data reconstruction, knowledge leakage across 21 attack and defense methods, 11 datasets, 10 models, 10 unlearning techniques, and 10 evaluation metrics | [2512.18035] |

Several empirical patterns recur. In black-box prompt-based forgetting, forgetting and retention are summarized by
\[
H=\frac{2\,Err_{\mathrm{for}}\,Acc_{\mathrm{mem}}}{Err_{\mathrm{for}}+Acc_{\mathrm{mem}}},
\]
and the best results arise from methods that raise forgotten-class error while keeping retained-class accuracy nearly unchanged; on CIFAR-10, the reported method attains \(Err_{\mathrm{for}}=96.10\), \(Acc_{\mathrm{mem}}=94.06\), and \(H=95.07\) [2411.00409]. In language-model unlearning, the introduction of \(S\text{-}EL\) and \(S\text{-}MA\) makes it possible to separate selective forgetting of sensitive spans from generic degradation of memorization or generation [2402.05813]. In multimodal unlearning, S-MLLMUn Bench evaluates forget-set removal, retain-set preservation, and visual understanding simultaneously, reflecting the paper’s criterion of benign forgetting [2511.20196].

System-oriented evaluations further show that selective forgetting is often judged by memory and compute as much as by accuracy. FadeMem reports a \(45\%\) storage reduction while improving retrieval and multi-hop reasoning [2601.18642]. FSFM reports access efficiency \((+8.49\%)\), content quality \((+29.2\%\) signal-to-noise ratio), and security performance \((100\%\) elimination of security risks) [2604.20300]. H\(^2\)-EMV reports \(45\%\) memory-size reduction, \(35\%\) query-time compute reduction, and a \(70\%\) improvement in second-round queries by adapting to user-specific priorities [2604.11306]. In continual learning, SFAO reports a \(90\%\) memory reduction on MNIST settings while remaining competitive in accuracy and forgetting [2603.26671].

## 6. Limitations, misconceptions, and open issues

A persistent misconception is to equate behavioral suppression with erasure. Black-box prompt forgetting does not change model weights and is therefore “closer to behavioral suppression at inference time than to certified machine unlearning” [2411.00409]. In-context knowledge unlearning makes this even more explicit: layerwise analyses show that the correct answer often remains recoverable through most of the forward pass and the decision to forget is made only at the last layer, hence the claim that “LLMs pretend to forget” [2410.00382]. This suggests that apparent forgetting under standard QA metrics may still leave internal representations intact.

Another recurrent limitation concerns guarantees. Weight scrubbing in deep networks provides a distributional indistinguishability objective that is described as a generalization and weakening of Differential Privacy rather than full DP itself [1911.04933]. In nonlinear calibration, selective forgetting is locally exact only at a fixed Gauss–Newton linearization, with relinearization needed when deletions shift the optimum materially [2511.14980]. In many systems papers, the criteria are operational and empirical rather than formal.

Selective forgetting also does not uniformly improve privacy. PrivUB shows that unlearning may create privacy vulnerabilities through discrepancy between pre-trained and unlearned models, residual leakage in the unlearned model, and post-unlearning recovery via fine-tuning or quantization; it further reports that retain-set privacy can worsen after unlearning [2512.18035]. A plausible implication is that deletion quality and privacy auditing should be treated as separate evaluation axes rather than assumed to coincide.

Finally, selective forgetting is controversial because “remembering more” is not always beneficial. In heterogeneous federated continual learning, AF-FCL argues that old knowledge can be harmful when it carries biased features, spurious correlations, or label-noise contamination, so selective forgetting becomes a way to suppress inaccurate or low-credibility replay rather than a concession to catastrophic forgetting [2502.14205]. The field therefore faces a dual challenge: forgetting must be strong enough to remove targeted information, yet narrow enough to avoid destroying utility, visual understanding, or retained memories. This tension, rather than any single algorithmic template, is the central organizing principle of selective forgetting as a research area.

Source: https://www.emergentmind.com/topics/selective-forgetting