F-OAL: Forward-only Online Analytic Learning with Fast Training and Low Memory Footprint in Class Incremental Learning

Huiping Zhuang, Yuchen Liu, Run He, Kai Tong, Ziqian Zeng, Cen Chen, Yi Wang, Lap-Pui Chau

Abstract

Online Class Incremental Learning (OCIL) requires models to learn from continuous data streams without revisiting past samples. A primary challenge is Catastrophic Forgetting (CF). While replay-based methods mitigate CF by storing exemplars, they impose significant memory overhead. We present Forward-only Online Analytic Learning (F-OAL), an exemplar-free approach that eliminates backpropagation. By utilizing a pre-trained frozen encoder with feature fusion and a Recursive Least Squares (RLS)-based analytic classifier, F-OAL achieves high accuracy with minimal computational and memory costs.

Introduction

In dynamic environments, data arrives sequentially in mini-batches. Standard neural networks suffer from Catastrophic Forgetting, where new information overwrites previously learned knowledge. Existing solutions often rely on "replay" buffers, which are problematic for privacy and resource-constrained devices. Exemplar-free methods avoid these buffers but typically struggle with accuracy and recency bias. F-OAL addresses these issues by treating incremental learning as a recursive linear regression problem, ensuring mathematical stability and efficiency.

Methodology: Ditching Backpropagation

F-OAL moves away from iterative gradient descent, which is inherently biased toward recent data. Instead, it employs a two-stage forward-only architecture.

1. Frozen Encoder and Feature Fusion

The system leverages a pre-trained Vision Transformer (ViT) backbone. Unlike traditional fine-tuning, the encoder remains frozen to preserve general features. To maximize representational power, F-OAL uses Feature Fusion, aggregating outputs from all ViT blocks rather than just the final layer. These fused features undergo a Smooth Projection—a random expansion into a higher-dimensional space—to enhance separability before reaching the classifier.

2. The Analytic Classifier (AC)

The core of F-OAL is the Analytic Classifier, which replaces the standard softmax layer. It solves for the optimal weight matrix using Recursive Least Squares (RLS). This allows the model to update its weights incrementally as new data arrives.

F-OAL Learning Agenda: The architecture processes data streams through a frozen encoder with feature fusion, updating the analytic classifier via recursive matrix updates ($R$) without backpropagation.

As shown in Figure 1, the model maintains a regularized feature autocorrelation matrix ($R$). This matrix acts as a compact summary of all previously seen data, allowing the model to "remember" past tasks without storing original images.

Experimental Results

F-OAL was evaluated against state-of-the-art replay-based and exemplar-free methods across six benchmarks, including CIFAR-100, CORe50, and FGVCAircraft.

Performance and Accuracy

F-OAL consistently outperformed other exemplar-free methods. On the Describable Textures Dataset (DTD), F-OAL achieved an average accuracy ($A_{avg}$) of 82.8%, significantly higher than the 70.9% achieved by SLCA. Even compared to replay-based methods like DVC (67.3%), F-OAL showed superior performance on specific benchmarks.

Performance Comparison: F-OAL demonstrates superior or competitive accuracy across various datasets compared to both replay-based (checked) and exemplar-free (unchecked) methods.

Efficiency: Speed and Memory

The "forward-only" nature of F-OAL results in dramatic efficiency gains:

  • Training Speed: On the FGVCAircraft dataset, F-OAL completed training in 16 seconds, whereas competitive methods like SLCA required over an hour (4,191 seconds).
  • Memory Footprint: F-OAL maintains a peak GPU memory usage of approximately 1.5GB, making it suitable for edge devices, while many replay-based competitors require 8-10GB to handle the same tasks.

Conclusion

F-OAL demonstrates that backpropagation is not strictly necessary for effective incremental learning. By combining a strong pre-trained backbone with an analytic recursive solver, the model achieves state-of-the-art performance with a fraction of the resources. While the method's efficacy depends on the quality of the pre-trained encoder, its speed and memory efficiency represent a significant step forward for real-world online learning applications.

Summary updated

BibTeX
@inproceedings{zhuang2024f,
  author = {Huiping Zhuang and Yuchen Liu and Run He and Kai Tong and Ziqian Zeng and Cen Chen and Yi Wang and Lap-Pui Chau},
  title = {{F-OAL: Forward-only Online Analytic Learning with Fast Training and Low Memory Footprint in Class Incremental Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=rGEDFS3emy},
}
Figure