TL;DR
By freezing the feature extractor and isolating the output layer, this paper untangles two major causes of catastrophic forgetting—weight modification and class interference—from representation drift. The authors show that simple modifications to the output layer (such as weight normalization, cosine classifiers, and gradient masking) allow models trained with standard SGD to learn continually without specialized continual learning algorithms.
What Problem Does This Paper Address?
Most continual learning (CL) methods train deep neural networks end-to-end. This entangles two separate sources of catastrophic forgetting:
- Projection Drift: Changes in the feature extractor over time that alter the latent representations of data.
- Classifier Forgetting: Degradation in the output layer caused by weight modification (optimizers updating weights for classes not in the current task) and class interference (unbalanced vector norms and biases favoring recently seen classes).
Because these phenomena occur simultaneously, it is difficult to determine whether a failure stems from a drifting embedding space or a poorly parameterized classification head. This paper isolates the output layer using a frozen, pre-trained feature extractor, removing projection drift to systematically evaluate which classifier designs inherently resist forgetting under different types of distribution shifts (class-incremental vs. lifelong domain drift).
Methods
The paper evaluates several output layer parameterizations and training modifications under a unified single-head setup (no task IDs at inference time):
- Standard Linear Layer: Evaluated with and without bias ($o = Az + b$ vs. $o = Az$).
- Simplified Weight Normalization (
WeightNorm): Enforces unit norm on class weight vectors ($\|A_i\| = 1$) and removes both bias and the learnable scale parameter $\gamma$ found in standard weight normalization, reducing interference caused by norm imbalances: $$o_i = \|z\| \cdot \cos(\angle(z, A_i))$$ - Cosine Classifier (
CosLayer): Computes purely the cosine angle between latent features and class vectors: $$o_i = \cos(\angle(z, A_i))$$ - Gradient Masking Strategies:
- Single Masking: During backpropagation, gradients are computed and applied only to the weight vector of the ground-truth target class.
- Group Masking: Gradients are applied only to classes present in the current mini-batch, strictly forbidding updates to absent/past classes.
- Non-Gradient Similarity Classifiers:
- $k$-Nearest Neighbors (KNN).
- Nearest Mean Classifier (
MeanLayer/ NMC): Predicts classes based on Euclidean distance to class prototype means. - Nearest Median Classifier (
MedianLayer): A proposed alternative that computes the per-dimension median prototype instead of the mean to improve robustness against feature outliers. - Streaming Linear Discriminant Analysis (SLDA): Tracks running class means and a shared covariance matrix.
Datasets
The authors benchmark these layers across distinct continual learning scenarios:
- CIFAR-10 & CIFAR-100: Evaluated in 5-task splits. For lifelong learning, a modified benchmark (CIFAR100Lifelong) is introduced: 20 coarse super-classes remain fixed across 5 tasks, but each task introduces distinct fine-grained sub-classes, inducing pure domain drift.
- Core50: Real-world object recognition dataset with 50 objects across 10 categories recorded under 11 distinct environments. Used for:
- Core50 (10 tasks, 5 new classes per task — class-incremental).
- Core10Lifelong (8 tasks across 8 environments with the same 10 categories — domain drift).
- Core10Mix (50 tasks where individual objects are introduced sequentially, revisiting categories — mixed drift).
- CUB-200: Fine-grained bird classification split into 10 tasks of 20 classes each.
Pre-trained backbones (ResNet, VGG16, GoogLeNet) were selected to ensure models were never pre-trained on the target evaluation data.
Key Insights and Ideas
- Norm and Bias Unbalance Drives Interference: In class-incremental settings, standard SGD aggressively inflates the norm and bias of active classes while shrinking past ones. Removing biases alone does not help, but constraining weight vectors to unit norm (
WeightNormandCosLayer) substantially reduces inter-class interference. - Masking Prevents Overwriting in Incremental Tasks: In class-incremental tasks, gradient masking prevents SGD from corrupting weights associated with past classes, yielding major stability gains without needing explicit regularization (like EWC) or rehearsal memory.
- Drift Type Dictates the Ideal Layer:
- In incremental scenarios (new classes), masked angle-based classifiers (
CosLayer-Masked,WeightNorm-Masked) perform best among gradient-based methods. - In lifelong scenarios (domain drift on known classes), all classes share output vectors. Masking harms performance and stability here because the classifier needs to coordinate decision boundaries across classes.
- Similarity Classifiers Are Extremely Strong Baselines: Non-gradient methods like SLDA and
MeanLayerconsistently outperform gradient-trained linear layers across diverse drift scenarios when using frozen representations, requiring only a single pass over the data.
Key Results
- Incremental Learning: On Core50 (10 tasks), standard
Linearsuffers catastrophic degradation, whereasWeightNormandCosLayercombined with masking maintain strong performance throughout the task sequence. - Few-Shot / Rehearsal Subset Regime: In experiments training classifiers from small data subsets (Core50):
- At 1,000 samples,
WeightNormachieves 69.44% accuracy and standardLinearachieves 69.03%, compared toLinear-Maskedat only 18.46% (demonstrating that masking is counterproductive in standard i.i.d. subsets). - Full-dataset non-gradient SLDA reaches 78.55%, outperforming standard Linear (76.29%).
- Mean vs. Median Prototype:
MedianLayerperforms comparably toMeanLayeracross most benchmarks (e.g., Core50 full: 70.22% vs. 71.51%), showing distinct benefits primarily on CIFAR-10 full data (70.44% vs. 63.27%).
Limitations and Future Work
- No End-to-End Representation Learning: The analysis intentionally freezes the backbone to eliminate projection drift. Consequently, top-performing non-differentiable methods (SLDA, KNN) cannot update the feature extractor directly without a hybrid scheme.
- Masking Fragility: Single masking severely hinders performance in non-incremental (lifelong and i.i.d.) settings because it prevents joint optimization of competing class boundaries.
- Future Transfer: The core open challenge remains bridging these isolated output-layer insights into full end-to-end architectures, finding training strategies or minimal-replay mechanisms that control projection drift while retaining the benefits of balanced, masked output layers.
Summary updated