Beyond Exemplar Selection: Value-Aware Memory Allocation in Replay-Based Continual Learning

Yuhang Li, Guoxu Zhou, Zhenhao Huang, Yuning Qiu, Qibin ZhaoNeurIPS 2026

TL;DR

When neural networks learn continuously, they keep a small "photo album" (a memory buffer) of past examples so they don't forget old lessons. For years, researchers have obsessed over which specific photos to put in that album, while lazily giving every category the exact same number of pages. This paper shows that dynamically budgeting how many memory slots each class gets—based on its actual mathematical utility—consistently boosts accuracy across existing continual learning pipelines without changing a single thing about how individual samples are picked.

What Problem Does This Paper Address?

Imagine trying to learn French right after mastering Spanish, without accidentally overwriting all your Spanish vocabulary. Neural networks are notoriously bad at this—a phenomenon appropriately called catastrophic forgetting. In Class-Incremental Learning (where a model learns disjoint sets of new classes sequentially and is tested on all of them without knowing which task is which), the gold-standard defense is replay: keeping a tiny, fixed-size memory buffer of old training examples ("exemplars") and mixing them in while learning new tasks.

Historically, almost all replay research has focused on instance-level selection: which exact images of a dog are the most representative or informative to save? Meanwhile, another major design choice is treated as an afterthought: how should the total memory budget be divided among classes?

By default, almost everyone uses uniform allocation—if your buffer holds 1,000 images and you've seen 100 classes, every class gets 10 slots. But classes aren't created equal. Some are noisy, some look confusingly similar to future classes, and some are rock-solid and barely need rehearsal. Giving every class equal real estate wastes precious memory on easy classes while starving vulnerable ones.

Figure 1: Controlled toy study on Split MNIST with three incremental tasks under ten seeds. The heatmap shows the change in final accuracy relative to uniform alloca- tion for different class-wise memory quotas. Here ma and mc denote the memory slots assigned to one digit in Task 1 and Task 2, respectively. The best allocation outper- forms uniform allocation by 13.6%.

In a controlled toy experiment on Split MNIST (above), simply shifting memory quotas away from a uniform split improved final accuracy by 13.6%—without changing the total budget or the sample-selection rule. Prior attempts to optimize these quotas dynamically relied on expensive offline reinforcement learning stages that break standard continual learning protocols. The authors wanted a lightweight, plug-and-play way to budget memory on the fly.

Methods

The authors propose VAMA (Value-Aware Memory Allocation), a modular budgeting layer that leaves within-class exemplar selection completely untouched. It works in three clean steps:

  1. Balanced Cross-Task Budgeting (Standard): Across different tasks, VAMA keeps budgets strictly equal (after $t$ tasks with total budget $M$, each task gets $\lfloor M/t \rfloor$ slots). Why? Because comparing utility signals across completely different points in time is uncalibrated and messy. When a new task arrives, older tasks simply shrink their existing class proportions down to fit their new, smaller task budget.
  2. In-Run Class Valuation (Novel application): Within the current task, VAMA estimates how valuable each class is using an idea inspired by Data Shapley (a game-theoretic way to measure an example's marginal contribution). Because true Shapley values require retraining a model thousands of times, VAMA uses a fast, first-order "in-run" approximation. It holds out a tiny slice of current-task data as a local validation set. During normal training, if a training sample's gradient points in the same direction as the validation gradient (measured via dot product), it gets a positive score. Averaging the positive scores per class gives a clean, task-local class utility value.
  3. Conservative Regularized Allocation (Novel): Raw utility estimates can be noisy, so going "all-in" on high-value classes would starve others. VAMA converts class values into memory quotas using a KL-regularized objective (Controlled by temperature $\tau$) plus an explicit shrinkage step ($\lambda$) that pulls the distribution back toward a safe, uniform prior. Finally, every class is guaranteed at least 1 slot before rounding.

Datasets

  • Split MNIST: Used for an initial 3-task toy study to isolate the impact of memory allocation.
  • CIFAR-100: Standard 100-class benchmark ($32 \times 32$ images), tested across 5-, 10-, and 20-task splits, plus a Long-Tailed CIFAR-100 variant (imbalance factor 20) to test class-imbalanced regimes.
  • ImageNet-100: A 100-class subset of ImageNet-1000 (~1,300 training images per class), also tested across 5-, 10-, and 20-task splits.

No new datasets were introduced; protocols follow standard class-incremental benchmarks across buffer sizes of 500, 1,000, and 2,000.

Key Insights and Ideas

  • How much you store matters as much as what you store: Simply pairing random exemplar selection with VAMA's smart class quotas (61.5% Avg / 44.4% Last accuracy) actually beats sophisticated Herding exemplar selection paired with standard equal quotas (60.0% Avg / 43.1% Last).
Table 3: Disentangling exemplar selection and memory allocation on CIFAR-100 with ER, M = 2k, and 10 tasks.
  • It's not just "give more slots to high-loss classes": Replacing VAMA's gradient-alignment signal with random non-uniform quotas (Rand-Q) or training-loss quotas (Loss-Q) fails to beat uniform allocation. High training loss often just flags noisy outliers rather than genuinely useful replay material.
  • Class utility crystallizes remarkably early: You don't need to wait until training finishes to know which classes need extra memory. By just the 5th epoch, the ranking of class values already reaches a Spearman correlation of $\rho = 0.838$ with the final full-training ranking, meaning VAMA can extract its allocation signal cheaply and early.
  • Fairness under hold-out: Even though VAMA sacrifices ~6% of current-task training data (32 of 500 images per class on CIFAR-100) to act as a local validation set rather than training on it, it still beats matched-data baselines by 3.3%–4.5% in final accuracy.

Key Results

Plugged into three classic replay baselines (ER, iCaRL, and FOSTER) as well as recent rehearsal-augmented methods (STAR and MRFA), VAMA improved performance across every single dataset, task split, and buffer size tested.

Table 1: Results on CIFAR-100 under different memory budgets and task protocols.
  • Consistent Final-Stage Gains: Improvements are especially strong in Last Accuracy (retention at the end of all tasks). For instance, on CIFAR-100 (10-task, 500 buffer), VAMA boosts iCaRL Last Accuracy from 22.45% to 28.74% (+6.29 points) and FOSTER from 43.34% to 48.23% (+4.89 points). On ImageNet-100 (20-task, 1000 buffer), iCaRL jumps from 27.72% to 32.88%.
  • Imbalanced Data: On Long-Tailed CIFAR-100, VAMA improves Last Accuracy by 2.12 points and reduces forgetting across Head, Medium, and Tail classes simultaneously—proving it doesn't just cannibalize rare classes to feed common ones.

Limitations and Future Work

  • Task-Local Blindness: Because VAMA's utility scores are computed purely within the current task, they aren't calibrated across time. As a result, VAMA has to keep cross-task budgets rigidly equal rather than dynamically shifting memory between old and new tasks.
  • Valuation Overhead: Computing per-sample gradient alignments and setting aside a hold-out validation split adds computational overhead, though extracting rankings at early epochs mitigates much of the cost.
  • Future Directions: Rather than treating class quotas as an isolated step, the authors suggest jointly optimizing class-wise allocation alongside within-class exemplar selection and rehearsal scheduling.

Summary updated

Abstract

Replay is a standard strategy for mitigating catastrophic forgetting in continual learning, where a bounded memory buffer stores exemplars from previously seen classes. Existing replay methods have largely focused on instance-level decisions, such as which samples to store, replay, or replace, while the class-wise allocation of memory slots is often treated as a uniform heuristic. Here, we study class-wise memory allocation as a complementary design axis and propose VAMA, a value-aware memory allocation framework. VAMA keeps cross-task budgets balanced, estimates task-local class values from Shapley-inspired sample utility scores, and converts them into class-wise quotas through a regularized allocation rule that conservatively deviates from class-balanced replay. This design changes only the class-wise budgeting rule and leaves within-class exemplar selection unchanged, making VAMA easy to integrate into replay pipelines. Experiments on CIFAR-100 and ImageNet-100 show that VAMA consistently improves ER, iCaRL, and FOSTER across different memory budgets and task protocols. Further analyses show that the improvements are not due to non-uniform allocation alone, and that allocation-relevant class-value rankings stabilize early in training, enabling efficient value-aware allocation. These results suggest that class-wise memory allocation is a consequential design choice in replay-based continual learning.
BibTeX
@inproceedings{li2026beyond,
  author = {Yuhang Li and Guoxu Zhou and Zhenhao Huang and Yuning Qiu and Qibin Zhao},
  title = {{Beyond Exemplar Selection: Value-Aware Memory Allocation in Replay-Based Continual Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=3bHKdbo9Qx},
}
Figure