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

Continual Learning Using a Kernel-Based Method Over Foundation Models

Saleh Momeni, Sahisnu Mazumder, Bing Liu

Abstract

Class-incremental learning (CIL) remains a significant challenge due to catastrophic forgetting and the difficulty of maintaining inter-task class separation. This paper introduces Kernel Linear Discriminant Analysis (KLDA), a method that leverages frozen foundation models (FMs) and kernel-based feature enhancement to achieve joint-training performance without the need for replay buffers. By combining Random Fourier Features (RFF) with incremental LDA, KLDA effectively maps latent features into a high-dimensional space where classes are more separable, providing a scalable and efficient solution for continual learning.

Introduction

In Class-Incremental Learning (CIL), models must learn a sequence of tasks, each introducing new classes, while retaining the ability to recognize all previously seen classes. This process is typically hindered by two primary issues: Catastrophic Forgetting (CF), where new updates overwrite old knowledge, and Inter-task Class Separation (ICS), where the model fails to distinguish between classes learned at different times.

While Foundation Models (FMs) like BERT or CLIP offer robust starting points, standard fine-tuning still suffers from forgetting. Rehearsal-based methods, which store old data, introduce privacy and efficiency concerns. KLDA addresses these by treating the FM as a fixed feature extractor, mathematically eliminating forgetting of the backbone's knowledge, and focusing on improving the separability of the resulting features.

Methodology

KLDA transforms the output of a frozen foundation model using three core techniques:

  1. The Kernel Trick (RBF): Features are implicitly mapped into a higher-dimensional space to enhance linear separability.
  2. Random Fourier Features (RFF): To avoid the $O(N^2)$ complexity of traditional kernel methods, KLDA uses RFF to approximate the kernel mapping with a fixed-dimensional vector. This ensures the method remains scalable to large datasets.
  3. Incremental LDA: Rather than just storing class means (prototypes), KLDA maintains a shared covariance matrix across all classes. This allows the model to account for the distribution shape of each class, leading to superior decision boundaries compared to simple distance-based methods.

An ensemble variant, KLDA-E, further improves robustness by averaging predictions from multiple KLDA models with different random initializations.

Figure 1: Sensitivity analysis of KLDA performance with respect to the kernel bandwidth (sigma) and the number of RFF dimensions (D).

Experimental Results

The researchers evaluated KLDA across diverse text and image classification benchmarks. In text classification, KLDA was tested using models ranging from MiniLM to Mistral-7b on datasets like CLINC and Banking.

Performance Against Baselines

KLDA-E consistently outperformed popular CIL baselines, such as EWC, L2P, and LAMOL, often by margins of 20-40 percentage points. Most notably, it frequently reached or exceeded the "Joint Training" upper bound—the accuracy achieved when training on all data simultaneously.

Table 1: Comparison of KLDA and KLDA-E against various CIL baselines and the Joint Fine-tuning upper bound across four text datasets.

Efficiency and Scalability

Because KLDA does not require backpropagation through the foundation model, it is exceptionally fast. Training on the CLINC dataset took approximately 10 seconds, compared to 4 minutes for joint training and over 20 minutes for some replay-based methods. Additionally, the memory footprint is relatively small, requiring roughly 29.5M parameters for the RFF mapping and covariance matrix, which is more efficient than many generative-head approaches.

Discussion and Conclusion

The success of KLDA suggests that for many CIL tasks, updating the backbone model may be unnecessary. The latent representations of modern foundation models are sufficiently rich; the primary challenge lies in how we interpret and separate these features. The inclusion of a shared covariance matrix (LDA) is a critical "secret sauce" that allows the model to understand the shape of data clusters across tasks.

However, the method's reliance on a frozen backbone means its performance is tied to the quality of the pre-trained FM. Future work may involve domain-specific pre-training to ensure the latent space is optimized for niche applications before the continual learning process begins.

Summary updated

BibTeX
@inproceedings{momeni2025continual,
  author = {Saleh Momeni and Sahisnu Mazumder and Bing Liu},
  title = {{Continual Learning Using a Kernel-Based Method Over Foundation Models}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  url = {https://openreview.net/forum?id=5bDKshoZlj},
}
Figure