Online Curvature-Aware Replay: Leveraging 2nd Order Information for Online Continual Learning

Edoardo Urettini, Antonio Carta

Abstract

Online Continual Learning (OCL) requires models to learn from a non-stationary stream of data while mitigating catastrophic forgetting under strict memory and computational constraints. Traditional methods relying on first-order optimization often suffer from a "stability gap"—a sharp performance drop at task boundaries—and a rigid stability-plasticity tradeoff. This paper introduces Online Curvature-Aware Replay (OCAR), a novel approach that leverages second-order geometry via the Fisher Information Matrix (FIM) to precondition gradients. By accounting for the curvature of the loss landscape, OCAR achieves smoother optimization trajectories and superior adaptation compared to standard first-order methods. Experimental results across Split-CIFAR100, Split-TinyImageNet, and Online CLEAR demonstrate that OCAR consistently outperforms state-of-the-art methods in both accuracy and representation quality.

Introduction

In the paradigm of Online Continual Learning, models encounter a continuous stream of data where each example is typically seen only once. The primary challenge is twofold: preventing the erasure of previously acquired knowledge (stability) while remaining flexible enough to incorporate new information (plasticity). Most existing OCL strategies utilize Experience Replay (ER), which stores a small subset of past data in a buffer to interleave with current samples.

However, ER-based models optimized with first-order methods like SGD or Adam frequently encounter a "stability gap." This phenomenon is characterized by a significant performance decline immediately following a task transition because the optimizer is "blind" to the curvature of the previous task's loss landscape. Consequently, the model may take steps that are beneficial for the current task but catastrophic for the geometry of the previous ones. OCAR addresses this by treating the parameter space as a Riemannian manifold, using second-order information to navigate the loss landscape more effectively.

Methodology: Online Curvature-Aware Replay (OCAR)

Second-Order Optimization and the FIM

The core innovation of OCAR is the use of the Fisher Information Matrix (FIM) to precondition the gradient. Unlike standard replay which moves in the direction of the steepest descent, OCAR reshapes the gradient based on the local curvature. This allows the model to move rapidly in directions where the loss function is flat (promoting plasticity) while moving cautiously in directions where the loss is steep for historical data (ensuring stability).

Efficient Approximation with K-FAC

Calculating and inverting the full FIM for modern deep neural networks is computationally prohibitive. To maintain the efficiency required for online learning, OCAR employs Kronecker-factored Approximate Curvature (K-FAC). This approximation factorizes the FIM into smaller, manageable matrices, making second-order calculations feasible without a massive computational overhead. The authors note that OCAR remains approximately only 3x slower than basic ER, which is significantly faster than many complex OCL alternatives.

Dynamic Regularization and Stability

To manage the transition to new data, OCAR incorporates two specific mechanisms:

  1. Dynamic Tikhonov Regularization ($\tau$): A damping term is applied to the FIM. The authors introduce a dynamic scheduling for $\tau$ to prevent unstable weight updates when the model encounters new classes where the FIM estimate is still noisy.
  2. Classifier Resetting: The authors identified that the final classifier layer is a primary source of instability. OCAR implements a specific reset for the K-FAC factors of the last layer when new classes are introduced, preventing stale statistics from corrupting the optimization of new heads.

Experimental Evaluation

Datasets and Benchmarks

OCAR was evaluated on three rigorous benchmarks designed to test different aspects of continual learning:

  • Split-CIFAR100: 20 tasks of 5 classes each, testing class-incremental learning.
  • Split-TinyImageNet: 20 tasks of 10 classes each, providing a higher-dimensional challenge.
  • Online CLEAR: A domain-incremental benchmark where classes remain constant but the visual domain evolves over 10 tasks, testing the model's robustness to distribution shift.

Performance Results

OCAR demonstrated superior performance across all metrics:

  • Accuracy: On Split-CIFAR100, OCAR achieved 34.9% accuracy, surpassing the previous state-of-the-art (LPR at 33.3%) and standard ER (28.2%).
  • Domain Robustness: In the Online CLEAR benchmark, OCAR reached 75.3% accuracy, a substantial lead over LPR's 65.2%.
  • Feature Quality: Through "Probed Accuracy" tests (where the backbone is frozen and only a linear head is retrained), OCAR proved to learn more generalizable and higher-quality features than its competitors.

Discussion and Insights

The Geometry of Forgetting

By visualizing 2D projections of learning trajectories, the authors found that standard ER exhibits abrupt, jagged deviations at task boundaries. In contrast, OCAR follows a significantly smoother path, moving more directly toward the joint optimum of all tasks encountered. This suggests that the FIM acts not just as a penalty (as in older methods like EWC), but as a dynamic stabilizer that reshapes the optimization path.

The Stability-Plasticity Knob

A key finding is the importance of the ratio between the learning rate ($\alpha$) and the Tikhonov regularizer ($\tau$). This ratio effectively controls the step size in directions of low curvature, providing researchers with a tunable "knob" to balance the model's ability to learn new tasks versus retaining old ones.

Limitations and Future Work

Despite its success, OCAR shows sensitivity to the underlying loss function. Specifically, it struggled when combined with DER++, likely because the entropy regularization in DER++ creates a loss landscape that violates the assumptions of the Fisher approximation. Future research will focus on more sophisticated curvature approximations, such as E-KFAC, and developing automated methods for the model to adapt its own stability constraints without manual hyperparameter tuning.

Summary updated

BibTeX
@inproceedings{urettini2025online,
  author = {Edoardo Urettini and Antonio Carta},
  title = {{Online Curvature-Aware Replay: Leveraging 2nd Order Information for Online Continual Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
}
Figure