NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

FeCAM: Exploiting the Heterogeneity of Class Distributions in Exemplar-Free Continual Learning

Dipam Goswami, Yuyang Liu, Bartłomiej Twardowski, Joost van de Weijer

TL;DR

FeCAM tackles exemplar-free continual learning by replacing standard Euclidean distance with a class-specific Mahalanobis metric. By accounting for the unique, non-spherical shapes of new class distributions, it achieves state-of-the-art performance without retraining the neural network backbone.

What Problem Does This Paper Address?

In Continual Learning (CL), an AI model must learn new tasks sequentially without forgetting old ones. The gold standard for preventing this "catastrophic forgetting" is storing a few examples (exemplars) of old data to replay later. However, in privacy-sensitive fields like healthcare, storing old data is often prohibited.

Recent "exemplar-free" methods have found success by training a strong feature extractor on the first task and then freezing it. To classify new tasks, they typically use a Nearest Class Mean (NCM) approach: they calculate a "prototype" (average feature vector) for each class and assign new images to the class with the closest prototype using Euclidean distance.

The authors identify a critical flaw: Euclidean distance assumes all classes have a "spherical" (isotropic) distribution in feature space. While this is true for classes the model was originally trained on, the authors show that new, unseen classes often have "stretched" or "flattened" (anisotropic) distributions. Using a simple circle-based metric to separate these complex shapes leads to poor accuracy.

Figure 1: Illustration of how feature distributions change in CIL. Euclidean distance (b) is suboptimal for the heterogeneous shapes of new classes. FeCAM (d) models these shapes using the Mahalanobis metric.

Methods

The authors propose FeCAM (Feature Covariance-Aware Metric), which moves beyond simple averages to model the covariance (the shape and orientation) of each class.

Key components include:

  • Anisotropic Mahalanobis Distance: Instead of measuring distance in a straight line, this metric scales distances based on the variance of the class distribution. It effectively creates non-linear, quadratic decision boundaries that better fit heterogeneous data.
  • Tukey’s Ladder of Powers: A transformation (specifically a square root in their experiments) applied to features to reduce skewness and make the distributions more Gaussian-like.
  • Covariance Shrinkage: A regularization technique that ensures the covariance matrices are stable and invertible, even when very few samples are available (crucial for few-shot learning).
  • Correlation Normalization: A step that scales all class covariance matrices so their diagonal elements are equal to one. This ensures that distances are comparable across different classes, preventing classes with high variance from "dominating" the feature space.
Figure 2: Comparison of Euclidean vs. Mahalanobis distance contours. Mahalanobis distance accounts for the spread of the data, correctly classifying points that Euclidean distance would miss.

Datasets

The authors evaluated FeCAM across a wide range of standard benchmarks:

  • Many-Shot CIL: CIFAR-100, TinyImageNet, and ImageNet-Subset.
  • Few-Shot CIL: CIFAR-100, miniImageNet, and CUB200 (birds).
  • Domain-Incremental Learning: CoRe50, where the same objects appear in different environments.
  • Pre-trained Models: They also tested the method using Vision Transformers (ViT-B/16) pre-trained on ImageNet-21k.

Key Insights and Ideas

  • Heterogeneity is the Hidden Enemy: The "aha moment" is the realization that new classes don't look like old ones to a frozen backbone. Figure 3 shows that the "singular values" (a measure of variance) for new classes are much larger and more varied than for old classes, proving their distributions are more spread out and complex.
  • Linear is Suboptimal: Most previous methods tried to train a linear classifier on sampled features. The authors demonstrate in Figure 5 that a Bayesian classifier using class-specific covariances is superior because the optimal decision boundaries between heterogeneous classes are naturally non-linear.
  • Efficiency Matters: Because FeCAM only involves calculating basic statistics rather than iterative training (backpropagation), it is incredibly fast. On ImageNet-Subset, it runs nearly 7.5x faster than competing methods like FeTrIL.
Figure 3: Analysis of singular values showing that new classes have much higher variance and more heterogeneous distributions than old classes.

Key Results

FeCAM consistently outperformed existing exemplar-free methods, often by significant margins:

  • CIFAR-100 (10 tasks): Achieved 70.8% average accuracy, compared to 66.6% for the previous state-of-the-art (FeTrIL) and 64.6% for standard NCM.
  • Few-Shot Learning: On miniImageNet, FeCAM improved the final session accuracy by 1.85% over the runner-up.
  • Domain-Incremental: On the CoRe50 dataset, FeCAM outperformed the popular L2P method by 11.55%.
Figure 4: Accuracy comparison on CIFAR-100. FeCAM (per class) significantly boosts performance for new classes compared to standard Euclidean NCM.

Limitations and Future Work

  • Strong Initial Backbone: FeCAM relies on the feature extractor learned in the very first task. If the first task is too small or unrepresentative, the features won't be rich enough to separate future classes effectively.
  • Frozen Representations: The method does not update the backbone. While this prevents forgetting, it also means the model cannot "learn" new feature representations that might be better suited for later tasks.
  • Future Directions: The authors suggest extending this theory to scenarios where the backbone is updated, which would require modeling how class covariances "drift" over time alongside the prototypes.

Summary updated

BibTeX
@inproceedings{goswami2023fecam,
  author = {Dipam Goswami and Yuyang Liu and Bartłomiej Twardowski and Joost van de Weijer},
  title = {{FeCAM: Exploiting the Heterogeneity of Class Distributions in Exemplar-Free Continual Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=Asx5eDqFZl},
}
Figure