BECAME: Bayesian Continual Learning with Adaptive Model Merging

Mei Li, Yuxiang Lu, Qinyan Dai, Suizhi Huang, Yue Ding, Hongtao Lu

Abstract

Continual learning (CL) requires balancing the retention of past knowledge (stability) with the acquisition of new information (plasticity). Traditional methods like Gradient Projection (GP) often over-prioritize stability, leading to high intransigence. We present BECAME, a Bayesian framework that adaptively merges a "stable" model (trained with constraints) and a "plastic" model (trained without constraints). By deriving a closed-form solution for the optimal merging coefficient via Laplace approximation, BECAME eliminates manual hyperparameter tuning and achieves state-of-the-art performance across multiple benchmarks, including CIFAR-100 and MiniImageNet.

Introduction

Continual Learning (CL) aims to enable artificial intelligence models to learn a sequence of tasks incrementally. However, this process is frequently hindered by "catastrophic forgetting," where updating model weights for a new task leads to the erasure of previously acquired knowledge. This challenge is often framed as the stability-plasticity dilemma: a model must be stable enough to preserve old memories while remaining plastic enough to integrate new data.

Current approaches, such as Gradient Projection (GP), maintain stability by restricting weight updates to the null space of previous task gradients. While effective at preventing forgetting, these constraints often act as a "straitjacket," limiting the model's ability to achieve high performance on new tasks. Recent explorations into model merging—averaging the weights of different models—have attempted to address this, but they typically rely on fixed merging ratios or expensive grid searches. This paper introduces BECAME, a framework that mathematically derives the optimal merging ratio to balance stability and plasticity dynamically.

Methodology: The BECAME Framework

BECAME (BayEsian Continual Learning with Adaptive Model MErging) utilizes a two-stage training process grounded in Bayesian inference.

Stage 1: The Stable Model

Upon the arrival of a new task, the model is first trained using standard Gradient Projection. This stage prioritizes stability, ensuring that the weight updates do not interfere with the performance of prior tasks. While this provides a safe baseline, the resulting "stable" model often suffers from high intransigence, meaning it fails to fully capture the nuances of the new task.

Stage 2: The Plastic Model

The model from Stage 1 serves as a starting point for a second, unconstrained training phase. In this stage, the model is allowed to learn the new task freely, without gradient constraints. This allows the parameters to move toward a local minimum that is optimized specifically for the current task, resulting in a "plastic" model with high task-specific accuracy.

Adaptive Merging via MAP Estimation

The core innovation of BECAME is the mathematical derivation of the optimal merging coefficient ($\lambda^*$). Rather than treating merging as a heuristic, the authors frame it as a Maximum A Posteriori (MAP) estimation problem. By employing a second-order Taylor expansion (Laplace approximation) and using the Fisher Information Matrix (FIM) to approximate the loss landscape's curvature, the authors derive a closed-form solution. This formula calculates the exact ratio needed to merge the stable and plastic weights to minimize the cumulative loss across all tasks encountered so far.

Experimental Results

The authors evaluated BECAME on several image classification benchmarks, including 10-split and 20-split CIFAR-100, 20-split MiniImageNet, and 25-split TinyImageNet.

Performance Gains

The results demonstrate that BECAME significantly outperforms existing baselines. When integrated with Gradient Projection Memory (GPM), BECAME improved average accuracy by over 3% across all datasets. Even more substantial gains were observed when applied to the Adam-NSCL baseline, with accuracy increases ranging from 6% to 8%.

Stability and Plasticity Metrics

BECAME successfully addresses the stability-plasticity dilemma. It significantly reduces the Intransigence Measure (IM), indicating superior learning of new tasks, while maintaining high Backward Transfer (BWT), which confirms that old knowledge is not sacrificed.

Computational Efficiency

Despite the addition of a second training stage, the calculation of the optimal merging coefficient is highly efficient. Computing $\lambda^*$ using the Fisher Information Matrix takes approximately 0.69 seconds per task, making it a practical addition to the training pipeline.

Discussion and Limitations

A key theoretical insight of this work is the proof that a lower cumulative loss always exists along the linear path between the stable and plastic models, provided the objective is convex along that path. This justifies the use of linear merging in parameter space.

However, the method does have limitations. The requirement for a second training stage increases the overall training time compared to single-stage methods. Additionally, the framework relies on the assumption of "linear mode connectivity." If a new task is sufficiently different to move the model into a separate loss basin, the linear path between models might encounter high-loss barriers, potentially degrading performance.

Conclusion

BECAME provides a robust, mathematically grounded solution to the stability-plasticity dilemma in continual learning. By replacing heuristic-based model merging with an adaptive, Bayesian approach, it achieves significant performance improvements with minimal computational overhead for the merging step itself.

Summary updated

BibTeX
@inproceedings{li2025became,
  author = {Mei Li and Yuxiang Lu and Qinyan Dai and Suizhi Huang and Yue Ding and Hongtao Lu},
  title = {{BECAME: Bayesian Continual Learning with Adaptive Model Merging}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=gU0MwTihsn},
}
Figure