Abstract
Continual learning aims to learn new tasks while maintaining the ability to solve past tasks. However, retaining all knowledge learned in the past may pose practical risks, such as data leakage. A recent study addresses this problem by introducing a new continual learning paradigm called Learning with Selective Forgetting (LSF), allowing the selection of the classes to be forgotten at each continual learning stage. The existing approach is to embed a class-specific pattern called mnemonic code into the input image; this serves to “bind” the images within the same class in the feature space, allowing for sharp control of memorization/forgetting of each class by simply keeping/discarding the code. One limitation of this approach, however, is the inconsistency that the code is embedded in the input image, even though the control of memorization/forgetting relies on the binding effect in the feature space. In this paper, we propose a novel approach that directly embeds the codes into the features. This idea brings a new technical challenge: unlike input images with bounded scales (0-255), intermediate feature scales are generally unknown and unbounded. We propose a new normalization layer, named StandMix, which simultaneously aligns the scale and embeds the code into the intermediate feature. We also introduce a code optimization approach to further enhance its forgetting performance. Experimental results demonstrate that the proposed method outperforms the existing approach and alternative normalization layers.
1. Introduction
In the field of Continual Learning, the primary challenge is typically avoiding "catastrophic forgetting"—the loss of previously acquired knowledge when learning new tasks. However, in many real-world scenarios, such as privacy-sensitive applications or data-deletion requests (e.g., GDPR), it is necessary for a model to intentionally "unlearn" specific information. This is the core of the Learning with Selective Forgetting Problem (LSFP).
Previous attempts at LSFP utilized "mnemonic codes"—unique patterns blended into input images to bind class features. However, these codes often degrade as they propagate through non-linear neural network layers. This paper proposes a more direct approach: embedding these codes within the intermediate feature space to ensure more robust control over memorization and forgetting.
2. Methodology
The proposed framework shifts the binding mechanism from the input level to the feature level. This bypasses early layers that might distort the code and acts directly on the semantic representations the model uses for classification.
2.1 StandMix Normalization
A significant challenge in feature-level embedding is the unpredictable scale of intermediate activations. To address this, we introduce StandMix (Standard Normalization and Mixing). This layer standardizes feature maps and then mixes them with a mnemonic code sampled from a Gaussian distribution. Crucially, StandMix can be implemented using standard Batch Normalization (BN) logic, making it easy to integrate into existing architectures like ResNet with negligible overhead.
2.2 Joint Code Optimization
Rather than using static random codes, we treat mnemonic codes as learnable parameters. The training process includes a "Warm-up" phase to initialize the model and "Interval Updates" using an Exponential Moving Average (EMA). This ensures that the codes evolve to sit perfectly within the natural distribution of the features they are trying to "bind."
3. Experimental Results
We evaluated our method on three standard computer vision benchmarks: CIFAR-100, CUB-200-2011, and Stanford Cars. Classes were partitioned into stages where specific classes were designated for retention or forgetting at each step.
As shown in the figure above, the proposed method (c) demonstrates precise control over class-specific performance. While the Vanilla approach (a) suffers from catastrophic forgetting and LwF (b) attempts to retain all knowledge, our approach allows for the sharp "turning off" of specific classes (e.g., class 1 at epoch 200) while maintaining high accuracy for others.
On CIFAR-100, the proposed method achieved a harmonic mean score (balancing memory and forgetting) of 83.39, compared to the previous best of 79.60 (LSF). Across all datasets, the method consistently outperformed the previous state-of-the-art by a margin of 5% to 12%.
4. Discussion and Conclusion
The success of this approach highlights that feature-level binding is more effective than input-level binding because it acts directly on the feature space where classification decisions are made. By embedding optimized mnemonic codes via the StandMix layer, we achieve superior control over model memory.
While highly effective, future work will investigate automated methods for selecting the optimal layer for code embedding, as deeper layers currently appear more semantically stable. Additionally, applying StandMix to other domains, such as Large Language Models (LLMs) where "unlearning" private data is a critical issue, remains a promising frontier.
Summary updated