Coresets via Bilevel Optimization for Continual Learning and Streaming

Zalán Borsos, Mojmir Mutny, Andreas Krause

TL;DR

This paper introduces a principled framework to construct data summaries (coresets) for deep neural networks by framing subset selection as a cardinality-constrained bilevel optimization problem. To bypass the crippling computational cost of differentiating through deep networks, the authors optimize over Neural Tangent Kernel (NTK) proxies and use generalized matching pursuit. Applied to continual learning and data streams, this method significantly outperforms conventional replay strategies (such as reservoir sampling or heuristic clustering) at mitigating catastrophic forgetting.

What Problem Does This Paper Address?

Deep neural networks struggle in continual learning and streaming settings because incoming data is non-i.i.d., leading models to overwrite past representations—a failure mode known as catastrophic forgetting.

One of the most effective countermeasures is replay memory, which retains a small buffer of historical examples to interleave with new data. However, how to populate and maintain this buffer remains a challenge:

  • Traditional theoretical coresets (weighted subsets that provably approximate full-dataset loss) offer uniform error bounds for simple models like $k$-means or logistic regression, but these bounds become vacuously loose or intractable for overparameterized neural networks.
  • As a result, empirical replay strategies typically fall back on uniform random sampling (e.g., reservoir sampling), distance-based heuristics (such as $k$-center clustering), or heuristic score sorting, none of which explicitly optimize the downstream generalization objective.

Methods

The authors formulate coreset selection as a cardinality-constrained bilevel optimization problem: find a sparse weight vector $w$ ($\|w\|_0 \le m$) minimizing the outer loss evaluated across the full training dataset, where the model parameters $\theta^*(w)$ are the argmin of the weighted inner loss.

Key algorithmic components include:

  1. Greedy Selection via Matching Pursuit: Rather than relaxing the $\ell_0$ norm (which fails due to scale invariance between loss weights and regularization), the algorithm applies cone-constrained generalized matching pursuit. At each step, it chooses the data point with the steepest negative implicit gradient—computed via the implicit function theorem—and then refines the non-zero weights using projected gradient descent.
  2. RKHS Proxy Reformulation via NTKs: Computing implicit gradients requires inverting an empirical Hessian over network parameters. For deep networks, this is prohibitively expensive (e.g., a single outer step took ~1 minute for ResNet-18). The authors substitute the deep net with an equivalent reproducing kernel Hilbert space (RKHS) proxy defined by the network's Neural Tangent Kernel (NTK). By the representer theorem, the inner optimization parameter dimension collapses from millions of weights to at most $m$ dual coefficients, delivering a $\sim 200\times$ speedup per outer descent step.
  3. Merge-Reduce for Streaming: To handle sequential streams without known task boundaries, the authors employ a hierarchical merge-reduce buffer. When buffer capacity is exceeded, adjacent memory slots are merged and reduced back to slot size by solving the bilevel coreset objective over the combined batch.
       Incoming Stream Batches (X_t)
                  │
                  ▼
         [ Proxy NTK Mapping ]
                  │
                  ▼
 ┌───────────────────────────────────┐
 │   Bilevel Matching Pursuit Step   │
 │   Outer: Loss on full batch       │
 │   Inner: Weighted proxy objective │
 └───────────────────────────────────┘
                  │
                  ▼
   [ Merge-Reduce Replay Buffer ] ──► Used for continual training

Datasets

The authors evaluated their framework on both standard vision benchmarks and robotic streaming data:

  • MNIST & SplitMNIST: Used for dataset summarization and task-incremental learning (5 sequential binary classification tasks).
  • PermMNIST: 10 tasks where each task applies a distinct fixed random pixel permutation to MNIST digits.
  • CIFAR-10 & SplitCIFAR-10: Evaluated on kernel ridge regression (KRR), a ResNet-18 architecture, and 5-task split classification.
  • iCub World 1.0: An imbalanced object image stream from robotics used for qualitative streaming demonstrations.

Key Insights and Ideas

  • Theoretical Equivalence to Influence Functions: The matching pursuit selection rule—picking the point maximizing bilinear similarity with the full gradient through the inverse Hessian—is analytically equivalent to picking the point with maximal empirical influence function on the outer loss.
  • Connections to Experimental Design: In regularized linear regression, the outer objective aligns with Bayesian $V$-optimal experimental design in the infinite-data limit, where the objective is approximately submodular, providing theoretical justification for greedy selection.
  • NTKs as Effective Data Selection Proxies: Even though fixed infinite-width kernels diverge from finite, feature-learning networks during prolonged training, the NTK captures enough structural inductive bias to serve as a high-fidelity surrogate specifically for data selection.

Key Results

  • Dataset Summarization: On CIFAR-10, kernel ridge regression with a 6-layer CNTK reached nearly 50% test accuracy using only 400 coreset points. A ResNet-18 trained on an unweighted coreset of 200 CIFAR-10 samples consistently outperformed uniform random subsets by several percentage points.
  • Continual Learning: In single-head buffer replay:
  • On SplitMNIST ($m=100$), the coreset method achieved 95.87% average accuracy, outperforming uniform sampling (92.80%), $k$-center (93.84%), and iCaRL (93.99%).
  • On SplitCIFAR-10 ($m=200$), it reached 37.60%, beating uniform replay (36.20%) and $k$-means (33.41%).
  • Integrated into Variational Continual Learning (VCL), it elevated SplitMNIST accuracy from 65.71% (with $k$-center) and 80.06% (uniform) to 84.66%.
  • Imbalanced Streaming: Under severe task imbalance (200 samples for early tasks, 2,000 for the last):
  • On SplitMNIST, streaming coresets achieved 92.30% accuracy versus 80.60% for standard reservoir sampling and 89.71% for class-balancing reservoir sampling (CBRS).
  • On SplitCIFAR-10, coresets achieved 33.98% versus 27.22% for reservoir sampling.

Limitations and Future Work

  • Scalability with Coreset Size: While inner-level dimension scales with coreset size $m$ instead of network parameter count, computing kernel matrices and inverting Hessians scales cubically with $m$ ($O(m^3)$). The proxy approach becomes computationally heavy beyond small coreset sizes ($m > 500$).
  • Heuristic Guarantees for Deep Models: While theoretical guarantees (convergence via matching pursuit and approximate submodularity) hold for linear/convex cases, applying the method to neural networks remains a heuristic without formal approximation bounds.
  • Kernel Computation Overhead: Constructing convolutional NTKs requires non-trivial upfront computation (e.g., ~56 seconds for a 1,000-point ResNet-18 batch).
  • Future Directions: Exploring alternative lightweight proxies (such as penultimate-layer embeddings or RBF kernels), scaling to larger buffer sizes via batch-greedy selection, and optimizing coreset retention to counteract data distribution biases beyond classification accuracy.

Summary updated

BibTeX
@inproceedings{borsos2020coresets,
  author = {Zalán Borsos and Mojmir Mutny and Andreas Krause},
  title = {{Coresets via Bilevel Optimization for Continual Learning and Streaming}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=tMIUkyI6Yn},
}
Figure