Bilevel Coreset Selection in Continual Learning: A New Formulation and Algorithm

Jie Hao, Kaiyi Ji, Mingrui Liu

TL;DR

Deep learning models often struggle to learn new tasks sequentially without forgetting old ones. This paper introduces BCSR (Bilevel Coreset Selection via Regularization), a novel framework that transforms the traditionally slow, discrete process of picking representative data "coresets" into a fast, continuous optimization problem. By employing a unique smoothed top-$K$ regularizer, BCSR achieves state-of-the-art accuracy in continual learning while running at least 58% faster than conventional greedy selection methods.

The Challenge of Continual Learning

Neural networks are notoriously prone to catastrophic forgetting during "Continual Learning" (CL)—the process of learning new tasks one after another. As the model adapts to new information, it tends to overwrite the weights that encoded previously learned tasks.

To combat this, researchers frequently use "rehearsal-based" methods. These methods maintain a small memory buffer of old data (a coreset) to replay alongside new data during training. The critical question then becomes: Which specific samples should be saved in the coreset?

Ideally, selecting these samples is framed as a bilevel optimization problem:

  1. Inner Loop: Train a model on a candidate coreset.
  2. Outer Loop: Select the coreset that yields the best performance on the entire dataset.

The catch is that picking a distinct subset of data is a discrete, combinatorial nightmare. Traditional "greedy" search algorithms are computationally expensive and scale poorly. Conversely, existing shortcuts often ignore the "nested" nature of bilevel optimization, resulting in coresets that fail to truly represent the broader dataset.

The BCSR Approach

The authors propose BCSR to shift the paradigm from "picking discrete items" to "learning a continuous distribution."

Overview of the BCSR framework for continual learning
  • Continuous Formulation: Instead of using binary masks (0 for exclude, 1 for include), BCSR learns a probability distribution $w$ over all training samples. The inner optimization problem then minimizes the weighted training error based on this distribution.
  • Smoothed Top-$K$ Regularizer: To ensure the coreset remains small (restricted to a size $K$), the authors introduce a novel regularizer based on the top-$K$ loss. Because standard top-$K$ functions are non-differentiable, they apply Gaussian smoothing. This renders the entire objective differentiable and friendly to first-order gradient-based optimization.
  • Efficient Solver: The team designed a first-order algorithm that utilizes hypergradients (approximating the Hessian-inverse-vector product) to update the sample weights. This allows the bilevel problem to be solved significantly faster than discrete search methods.
  • Proxy Model: Unlike previous works that rely on fixed mathematical kernels (such as Neural Tangent Kernels), BCSR uses a "proxy" neural network sharing the same architecture as the main model. This enables hierarchical feature learning directly during the selection process.

Experimental Setup and Key Insights

The authors evaluated BCSR across a wide range of standard and challenging benchmarks, including image classification tasks (Split CIFAR-100, Permuted MNIST, Tiny-ImageNet, Split Food-101) and heterogeneous datasets. Crucially, they tested the framework under three challenging conditions: balanced data, imbalanced (long-tailed) data, and data with label noise (20% noise).

Key Insights

  • Differentiability is King: By smoothing the top-$K$ loss, coreset selection is brought into the realm of standard deep learning toolkits, making it highly practical for large-scale models.
  • Respecting the Nest: Maintaining the strict bilevel structure ensures that the coreset is optimized specifically for the model's actual learning trajectory, rather than relying on decoupled heuristics.
  • Robustness to Noise: BCSR proved exceptionally robust to label noise compared to greedy methods. While greedy methods often "overfit" to noisy outliers by minimizing immediate loss, BCSR’s probabilistic approach acts as a natural filter.

Key Results

BCSR consistently outperformed competitive baselines (such as iCaRL, Grad Matching, and OCS) across multiple metrics.

Performance of BCSR across balanced, imbalanced, and label-noise settings on Permuted MNIST
  • Superior Accuracy: On the highly challenging imbalanced "Multiple Datasets" benchmark, BCSR improved average accuracy by 4.65% over the next best method.
  • Massive Speedup: Compared to the standard "Greedy Coreset" bilevel approach, BCSR reduced running time by at least 58% across various benchmarks.
  • Forgetting Alleviation: The method demonstrated a strong ability to mitigate catastrophic forgetting, maintaining higher accuracy on early tasks even after numerous subsequent tasks were introduced.
  • Theoretical Guarantees: The authors provided rigorous proofs showing that their algorithm converges to an $\epsilon$-stationary point with a computational complexity of $O(1/\epsilon^4)$, matching the best-known rates for single-level non-convex problems.

Limitations and Future Work

While highly effective, BCSR does have a few limitations:

  • Hyperparameter Sensitivity: Performance relies on tuning the regularization weight $\lambda$ and the smoothing factor $\delta$. While effective ranges are provided, new domains may require careful recalibration.
  • Computational Overhead: Although significantly faster than greedy methods, bilevel optimization remains more computationally demanding than simple uniform sampling. Practitioners must weigh the trade-off between coreset quality and selection time.
  • Domain Extension: The current evaluation focuses heavily on image classification. Future research could explore how this continuous bilevel formulation adapts to Natural Language Processing (NLP) or Reinforcement Learning (RL) in continual settings.

Summary updated

BibTeX
@inproceedings{hao2023bilevel,
  author = {Jie Hao and Kaiyi Ji and Mingrui Liu},
  title = {{Bilevel Coreset Selection in Continual Learning: A New Formulation and Algorithm}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=2dtU9ZbgSN},
}
Figure