Manuscript Offprint
arXiv:2610.38577Episodic looking - using reinforcement learning to bias perception enhances few-shot and continual learning with protection from forgetting
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
There is a fundamental contradiction between the desire for models that can generalize, and models that can continuously adapt to recent input with changing statistics. These conditions, captured in few-shot and continual learning settings, can bias or disrupt learned representations. This harms generalization to a broader context, leaving the model unable to overcome input variance.
This paper proposes a solution based on the Complementary Learning System architecture (CLS), in which a Short-Term Memory (STM) delegates generalization to a slow, statistical Long-Term Memory (LTM). Delegation is achieved by working in a space of robust, generalized perceptions produced by the LTM. With this separation, the STM can focus on memorizing recent input and avoiding interference between memories.
We show that on an image classification task, the resulting CLS model is more resistant to forgetting in a domain-incremental continual learning setting than a baseline ResNet LTM, and generalizes more effectively in a few-shot setting than other continual learners.
In the continual setting, overall accuracy is slightly worse than existing continual learning models, but with a different mix of performance characteristics. Results analysis suggests that the model is limited by the representations and representational plasticity of the LTM. In future work, we will seek to address this by replaying STM memories to the LTM.
1 Introduction
In a learned statistical representation, individual samples are not memorized independently but contribute incrementally to latent variables which jointly represent the data. By capturing statistical regularities in the data, the learned representation describes not just the individual samples but the statistics of the population from which those samples were drawn. Attempts to make substantial changes to the representation in response to a few recent samples disrupts the representation of older samples, causing a phenomenon known as “catastrophic forgetting” [McCloskey and Cohen, 1989, Goodfellow et al., 2013]. Researchers have proposed many methods to minimize interference between memories, which can be broadly categorized as regularization methods (such as Elastic Weight Consolidation [Kirkpatrick et al., 2017]), parameter isolation methods [Chen et al., 2026], and rehearsal methods, such as experience replay [Rolnick et al., 2019]. Many methods make assumptions about the task, such as awareness of phase changes. A good survey of continual learning techniques and their various assumptions can be found in [Wang et al., 2024].
A simple form of parameter isolation is to keep a pre-trained encoder frozen and continually learn only a small model which consumes the frozen features. Given effective features, a nearest-class-mean (NCM) classifier on a frozen encoding can be competitive with leading methods [Janson et al., 2022], and is competitive with the state of the art in some class-incremental learning tasks [Zhou et al., 2024]. Recently, a method called RanPAC improved this approach by adding a fixed random projection of the frozen features [McDonnell et al., 2023]. In this paper, we adopt a similar approach and explore a variety of small continual learning models which consume a set of frozen features in a domain-incremental setting.
1.2 Complementary Learning Systems
There are several tensions between the requirements of optimal statistical learning and the requirements of fast, few-shot, and continual learning. Often, the objectives of one type of learning – such as generalization – contradicts other objectives, such as rapid adaptation to changing environments, which requires a bias towards more recent input.
The Complementary Learning Systems (CLS) framework provides a biologically inspired solution to achieving both rapid, continual learning of current input and slow, statistical learning of permanent memories. It comprises two memory systems, a Short-Term Memory (STM) and a Long-Term Memory (LTM). In the canonical biologically-inspired formulation, the hippocampus acts as a fast, episodic STM, while the neocortex as LTM gradually accumulates statistical regularities to support slow, stable learning [McClelland et al., 1995].
More recent work has emphasized how the hippocampus can support rapid inference over episodic experiences, enabling learning without catastrophic forgetting [Kumaran et al., 2016]. Most CLS models focus on episodic STM memorization for replay and consolidation to the LTM, allowing the latter to learn generalized structure [Spens and Burgess, 2024].
1.3 Active Perception in a Complementary Learning System
Active perception describes a process in which the agent takes actions to influence or improve its own sensory input. These actions might include moving to a new viewpoint, or changing the way sensor data is interpreted and integrated over multiple observations to resolve ambiguity.
Perception can be both data-driven and goal-guided. Bottom-up perceptual processes build structure from sensory input, whereas top-down adapts that structure to satisfy task demands, effectively filtering noise and highlighting contextually relevant aspects of the input. Active perception links perception and action in a closed loop: the agent's current beliefs and goals guide where and how it gathers data, and the resulting data updates its beliefs and subsequent actions. This perspective aligns closely with notions from cognitive neuroscience that perception is not a passive "snapshot" of the world but a dynamically constructed interpretation influenced by prior knowledge, expectations, and behavioral goals [Bajcsy et al., 2018].
In all real environments there are various sources of noise, variance and uncertainty, which can only be overcome by generalization of previous input. Active perception within a CLS might relax some of the tension between slow learning of generalities and fast, few-shot, continual learning by reducing the need for the STM to generalize, while preserving generalization in the system as a whole.
A non-generalizing STM could instead overcome data variance by using active perception to ensure its input is in generalized, familiar terms, even if the external input is novel (figure 1).
In this model, the STM would emit perception control signals which modify the way the LTM represents external input. Since the LTM is a slow, statistical learner, it will recognize and encode novel sensory data as known concepts. For instance, the same image of a bird could be perceived at different levels of specificity — "a flying animal," "a bird" or "a cockatoo" – or even in task-relevant terms such as "is this a threat?"

Figure 1: Active perception within a Complementary Learning System could allow a STM to learn rapidly without needing to generalize. In this concept, generalization occurs within the LTM, which is manipulated by the STM to emit stable, familiar representations relevant to the task. Using the generalization ability within the LTM, the STM could even immediately reason about completely novel stimuli, if they are expressed in terms the STM can already understand.
If an LTM can encode the features of novel stimuli as known representations, an active-perception STM could act immediately (zero-shot) in response to unfamiliar data. Without the requirement to learn generalized representations, it is also easier for the STM learn rapidly and to ensure new memories do not interfere with old ones, because parameters can be safely isolated.
This type of interaction between a fast, episodic memory and a slow, statistical memory has previously been explored in machine learning. In “Human-inspired Episodic Memory for Infinite Context LLMs” [Fountas et al., 2024] augment a frozen large language model with an episodic memory module, retrieving past experiences to construct long-context reasoning without fine-tuning the model.
Similarly, MemRL [Zhang et al., 2026] combines a frozen LLM with an episodic memory. Reinforcement signals are used to update the episodic memory and improve system performance without modifying the LLM.
Other authors have emphasized the quality and reusability of pre-trained visual features in continual learning tasks [Janson et al., 2022, Zhou et al., 2024]. All cited works support the idea that a fast memory system should be able to leverage a slow, statistical model to interpret input in a way that supports rapid learning of context-dependent reasoning.
2 Method
This paper describes a specific implementation of the ideas above, applied to the CIFAR-100 image classification dataset [Krizhevsky, 2009] in domain-incremental continual learning and few-shot settings. The experiments are designed to facilitate exploration of the ‘active perception in CLS’ concept. They are not intended to maximize benchmark performance.
We include comparisons to a baseline ResNet-18 model [He et al., 2016] which represents the conventional statistical learning paradigm, and several CLS STM variants including the FlyModel [Shen et al., 2023] and SDMLP [Bricken et al., 2023] continual learners.
Excluding LTM pre-training, all experiments and models learn online. Source code for all methods, models and data are available at:
https://github.com/Cerenaut/episodic_looking
2.1 Data
All reported experiments use the CIFAR-100 image classification dataset [Krizhevsky, 2009]. Each RGB image has size . The dataset has 20 “coarse” classes and 5 “fine” sub-classes of each coarse class, yielding a total of 100 unique classes (figure 2). The dataset is structured this way to allow evaluation of transfer and generalization between related fine-classes, and discrimination between coarse classes.
To create few-shot and continual learning tasks, we first pre-train the LTM on fine-classes 1 and 2 of all 20 coarse classes. Next, we pick a pair of coarse classes representing “current” input and explore few-shot and continual learning of the unseen fine-classes 3, 4 and 5 of the selected coarse pair. Each pair defines a binary classification problem; however, the target class space is fixed to the original 20 coarse classes, with new fine-classes causing input distribution changes compared to pre-training.
Since this research is an initial feasibility study, we have focused on four pairs of coarse classes which we have labelled A to D (see table 1). These pairs were chosen to (hopefully) represent a range of classification and transfer difficulty levels.

Figure 2: The CIFAR-100 dataset has 20 “coarse” classes and 5 “fine” sub-classes of each coarse class, yielding a total of 100 distinct classes. The LTM is pre-trained on fine classes 1 and 2 of all coarse classes. Next, individual pairs of coarse classes are selected for continual and few-shot experiments using the unseen fine classes 3, 4 and 5.
Table 1: Details of the coarse classes used in reported experiments. We formed four pairs (A-D) from these 8 coarse classes.
| Pair | Coarse classes | Fine classes | |||||
|---|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | |||
| A | 1 | Aquatic mammals | Beaver | Dolphin | Otter | Seal | Whale |
| A | 2 | Fish | Aquarium fish | Flatfish | Rays | Shark | Trout |
| B | 3 | Flowers | Orchids | Poppies | Roses | Sunflowers | Tulips |
| B | 4 | Food containers | Bottles | Bowls | Cans | Cups | Plates |
| C | 6 | Electrical devices | Clock | Keyboard | Lamp | Telephone | TV |
| C | 7 | Furniture | Bed | Chair | Couch | Table | Wardrobe |
| D | 16 | Reptiles | Crocodile | Dinosaur | Lizard | Snake | Turtle |
| D | 17 | Small mammals | Hamster | Mouse | Rabbit | Shrew | Squirrel |
2.2 Model
Our proposed model (RL-STM) is a Complementary Learning System (CLS), comprising LTM and STM components (figure 3). The output is always produced by the LTM model, which can be independently pre-trained, fine-tuned and evaluated. This makes analysis of the LTM alone an excellent ablation to characterise the contribution of the STM. The RL-STM can observe the latent states of the LTM and emits a multiplicative bias which gates the forward pass between one pair of residual stages. Unlike most prior instantiations of CLS (Spens and Burgess [2024], Sun et al. [2023], Schapiro et al. [2017]), the STM does not augment the LTM, or help it to learn. Instead, the LTM supports the STM, which is the primary actor.
2.2.1 Long-Term Memory (LTM)
The LTM is a ResNet-18 architecture [He et al., 2016] adapted for CIFAR images. The network employs the original post-activation ResNet block, comprising two convolutions with batch normalization and ReLU activation, with identity shortcuts when feature dimensions are unchanged

Figure 3: Architecture of the proposed CLS model with a sparse, episodic (RL) Short-Term Memory (STM). The STM is an Advantage Actor-Critic (A2C) model. The actor produces a multiplicative bias output which gates the residual stream of the Long-Term Memory (LTM), a four-stage ResNet-18 model adapted to CIFAR images. STM input includes previous bias output, post-bias LTM encoding and LTM classification logits. These accumulate in a buffer over each episode; the initial encoding is unbiased. The STM is rewarded for producing bias which improves the accuracy of LTM classification.
and learned 1×1 projection shortcuts when spatial resolution or channel dimensionality changes. Further details are provided in Appendix B.
The LTM was pre-trained for 13 epochs with iid sampling of fine-classes 1 and 2 of all coarse classes. It achieves a test set accuracy of 63.6% on fine classes 1 and 2 of all coarse classes. The same model achieves a test set accuracy of 31.5% on fine classes 3, 4 and 5 of all coarse classes. The LTM is deliberately under-trained to retain representational plasticity; one reported ablation uses an LTM with prolonged training (40 epochs).
2.2.2 Short-Term Memory (RL-STM variant)
The RL-STM is implemented as an online, Advantage Actor-Critic (A2C) Reinforcement Learning agent [Mnih et al., 2016]. Supervised learning requires a known, objectively correct output for every input. Reinforcement learning requires only outcome evaluation, which can be sparse and/or delayed, making it a natural choice for episodic interactions with an environment. Although dense and immediate rewards are provided in these experiments, in theory it should be possible to generalize the RL-STM model to more complex environments while retaining the same perceptual architecture.
The RL-STM receives input from the LTM and produces a continuous action output vector which biases the forward pass of the LTM (figure 3). This design is unusual – most previous work using RL in active perception focuses on where to look (e.g. [Chen, 2021, Mnih et al., 2014]) rather than how to interpret the input.
Each CIFAR image is observed over an episode of fixed duration steps. Within each step:
- The previous LTM “encoding”, LTM classification logits and bias are appended to an input buffer. All gradients are discarded.
- The RL-STM performs a forward pass, consuming the input buffer, producing a new bias from the actor.
- The LTM performs a forward pass, incorporating the bias, producing an output classification.
- A reward is computed for the step.
The bias defaults to 1 at the start of each episode and the LTM performs an initial, unbiased forward pass on the reset observation. Rewards are calculated as the net change in the unit-scaled cross-entropy between predicted class distributions and target distributions , as defined in Equation 1.
The critic is trained using the Huber loss, as commonly used for value-function estimation in deep reinforcement learning [Mnih et al., 2016].
The policy is constrained to change gradually using a PPO-style clipped surrogate objective [Schulman et al., 2017]. At each environment step, the action sampled by the previous policy is re-evaluated under the updated policy, and the resulting probability ratio is clipped to limit the magnitude of the policy change. The clipped objective is weighted by the one-step advantage from the preceding transition.
Both actor and critic comprise 3 fully-connected layers of size 1000, 1000 and (128 or 1) respectively. Model parameters are updated after each environment step with no backpropagation through time or into the LTM. There is no replay buffer. Leaky-ReLU nonlinearities are used in the hidden layers. The model has no regularization features except sparse activation of hidden layers – details below. To explicitly control learning rate, a Stochastic Gradient Descent optimizer is used with an aggressive learning rate of 0.1 and momentum 0.5.
The RL-STM input buffer contains a concatenation of 3 inputs (figure 3): The previous LTM “encoding”, taken from the spatially-pooled output of the residual stage that the bias acts on, after the bias is applied, so the RL-STM observes the layer it controls; the LTM classification logits; and the applied bias. These were chosen to help the RL-STM discover how to control the LTM. The unbiased encoding is assumed to contain potential interpretations of the input which can be “selected”.
The 128-element bias is applied after the second residual stage, which has dimension . The same bias is applied at all convolutional positions. This choice is constrained by the requirement that the LTM generalize over input variance: bias applied at earlier stages would directly manipulate pixels or relatively low-level image features, for which a learned bias is unlikely to generalize across inputs. RL-STM bias output b is applied to LTM stage output y per equation 2.
We attempted to apply bias after the final encoding (dimension ) but found that the resulting representation was highly resistant to bias. Even replacing 50% of the representation elements with random values had no measurable effect on the classification outcome.
These observations suggest a constraint on where top-down perceptual bias can usefully be applied. At early processing stages, representations remain too closely tied to the raw sensory input for a learned bias to generalize effectively. At later stages, representations become sufficiently distributed and invariant that substantial perturbation of individual elements has little effect on the resulting classification.
Intermediate representations therefore occupy a potentially important regime: they contain abstractions sufficiently general to support transfer, while retaining sufficient structure for top-down modulation to influence subsequent perception. This provides a computational motivation for access to intermediate perceptual representations, rather than restricting top-down access to fully abstract, symbolic representations.
2.2.3 Sparse activation of STM hidden layers
Sparse representations provide a principled approach to achieving more efficient and robust non-interference between memories [Bricken et al., 2023, Shen et al., 2023]. By encoding information such that only a small subset of units is active for a given observation, sparse codes naturally separate features and minimize overlap between representations – they are highly orthogonal. Sparse representations enable fast learning because updates to one subset of active units minimally affects others, a property first formalized in Kanerva’s sparse distributed memory [Kanerva, 1988].
More recently, the Kanerva Machine [Wu et al., 2018] demonstrated that sparse, distributed memory can support generative reconstruction and fast adaptation to new inputs. These findings substantiate the key point that non-interference via sparsity is a powerful enabler of rapid learning, particularly in situations where generalization is not strictly required.
Sparse hidden-layer activity is produced in the RL-STM via a binary mask , which is generated via a fixed, random, linear projection of the input (equation 3). has dimension where is the capacity of the memory and is the number of elements in the input .
A fixed Top-K sparsity is applied to per equation 4 yielding the mask . was used in our experiments. Finally, the Hadamard (elementwise) product of and the post-activation layer output gives the sparse layer output (equation 5).
The input and output layers are not sparse. All hidden layers use the same mask; larger layers can be constructed as integer multiples of the base representation size with the mask correspondingly repeated.
To maximize memory utilization, small quantities could be randomly added to values of which correspond to hidden layer “cells” that rarely participate in active cliques. Alternatively, as in “Continual Backprop” [Dohare et al., 2021], disused cells could simply have their parameters in re-initialized. However, neither option was used in this paper.
2.3 Comparison and ablation models

Figure 4: Comparison and ablation STM variants. The RL-STM is compared to some competitive published models (FlyModel, SDMLP) and some simple alternatives such as ablation of various features (linear probe, sparse supervised STM without RL, LTM-only fine-tuning). The Nearest Class Mean (NCM) keeps a running mean of all input samples. The STM variants all consume the 512-dimensional encoding produced by global average pooling of stage 4, which is the input of the LTM's own dense classifier. Only the RL-STM biases the LTM. Italics describe how each STM learns. The linear probe's dense layer is initialized from the LTM's.
The CLS-inspired RL-STM model combines two ingredients that are known, separately, to reduce interference: a frozen LTM, and hidden layers with sparse activity. To attribute the results to the
STM's active-perception loop rather than to these ingredients alone, we compare to STM variants that share the ingredients but classify the LTM's encoding directly, without biasing it (figure 4).
The most relevant prior work is the Sparse Distributed Multi-Layer Perceptron (SDMLP) of Bricken et al. [2023], which learns continually without replay on Split CIFAR-100 by placing a fixed-random-projection and a Top-K hidden layer on top of a frozen, pre-trained convolutional encoder; and its precursor, the FlyModel of Shen et al. [2023], a Hebbian learner derived from the fly olfactory circuit [Dasgupta et al., 2017]. We also include two standard reference heads for continual learning on frozen features: a linear probe (simply a dense layer) and a nearest-class-mean (NCM) classifier. Further implementation details can be found in Appendix D.
Table 2: The RL-STM could potentially be applied in a wider range of tasks than the other STM variants, because it does not require target labels, a differentiable task loss (the gradient of the loss with respect to its own parameters), or information about phase changes during continual learning. Label-routed updates: the label decides which parameters change, and only the true class's parameters do. Every model we run is phase-blind, but other continual learners such as EWC can exploit this information.
| STM variant | Target labels | Label-routed updates | Differentiable task loss | Phase change input |
|---|---|---|---|---|
| RL-STM | no | no | no | no |
| Sparse supervised STM, linear probe, SDMLP | yes | no | yes | no |
| FlyModel, NCM | yes | yes | no | no |
| LTM-only fine-tuning | yes | no | yes | no |
| SDMLP+EWC or EWC (not evaluated) | yes | no | yes | yes |
The STM variants use information the RL-STM does not assume (table 2). FlyModel and NCM update only the true class's weights, which reduces interference with memories of other classes. This is label-routed protection, the "partial freezing" of Shen et al. [2023], and it requires knowing the correct output, which a reward does not provide.
2.4 Experiment design
We performed few-shot and continual learning experiments to illustrate the effects of different learning scenarios on the proposed CLS / STM models and comparison to LTM-only fine-tuning. All STM models are pre-trained on fine-classes 1 and 2 of the selected coarse class pair. Every experiment shares the same pretrained LTM checkpoint. All STM models are trained online, with model updates after each minibatch of images (each episode step of the RL-STM model).
Learning rates and training epoch budgets were optimized for most STM variants, except RL-STM – see Appendix A. For this purpose a validation set of 100 images per class was extracted from the 500 training images per class, leaving all STM models with 400 training images.
In the continual learning setting, models are allowed to train on samples from only one unseen fine class during each phase. After completion of the phase, the model is allowed to train on samples from the next unseen fine class. Results are reported for different exposure orders of fine classes 3, 4 and 5. This setting challenges the model to learn from new data while avoiding interference with existing memories. Since the label is always the coarse class, "learning" a fine class here means learning to assign its images to the correct coarse class, and "forgetting" means losing that ability for fine classes trained in earlier phases.
In the few-shot learning setting, after pre-training, models are allowed to train on different quantities of samples from one unseen fine class to observe the degree of generalization and transfer that occurs. Generalization refers to performance on the unseen test set of the training class. Transfer refers to learning of class B due to training on another class A, again measured by accuracy on the unseen test set for class B. Results are reported for training on fine classes 3, 4 or 5.
In all settings, accuracy is measured on the test sets of all five fine classes of the selected coarse classes, as a 20-way argmax over all coarse-class logits. However, due to coarse class pairing, every task is in effect a binary classification problem with a 50% chance level.
3 Results
This section compares the RL-STM to the ablation models (Sparse supervised STM, linear probe, NCM and LTM-only fine-tuning) and relevant comparison models from the literature (FlyModel, SDMLP). The models are evaluated in both continual and few-shot learning settings.
3.1 Continual learning
Table 3 and figure 5 capture the results for the continual learning setting over the four selected coarse class pairs A-D.
SDMLP achieves the highest accuracy overall, closely followed by FlyModel and NCM. The RL-STM has overall accuracy close to LTM-only fine-tuning, but their behaviour is actually quite different.
The bottom row of figure 5 shows the stability-plasticity tradeoff for each model. The RL-STM tends to be close to the FlyModel, SDMLP and NCM with high stability and low plasticity. Consulting the middle row of this figure and table 3 shows that the RL-STM forgets about as much as the SDMLP, but it also learns a bit less overall.
In contrast, the LTM is far more plastic and far less stable. Figure 6 explores this aspect by breaking down accuracy over the four fine-class test sets (1 & 2, 3, 4 and 5). It shows that LTM-only fine-tuning learns the most, but also forgets a lot. As expected, the NCM doesn't really forget anything, but the addition of new training samples changes the classification of some test samples. The RL-STM doesn't learn the new class as much as the LTM, but it forgets a lot less. The sparse supervised STM is effectively the same model as the RL-STM, but trained to classify directly. It learns a little more, but forgets a lot more as well.
The RL-STM, linear probe and LTM-only fine-tuning also demonstrate substantially greater forward transfer (FWT) than all the other models, averaging +0.19, +0.13 and +0.34 respectively versus -0.006 to +0.012 for the other STM variants (table 3). This metric assesses how well training on earlier tasks helps the model to learn future tasks.

Figure 5: Continual learning results, with test set accuracy for each of the four fine-class sets plotted over the three training phases. Results are averaged over the seeds and orderings of fine classes 3, 4 and 5. Top row: Accuracy over the 4 test sets (1 & 2, 3, 4, 5). Middle row: Forgetting of any trained fine classes trained so far. Bottom row: Stability / plasticity tradeoff of each model.
Table 3: Continual learning test set accuracies over 4 coarse class pairs A-D. Results are averaged over 3 class orderings per pair, and then averaged over pairs. ACC: final average accuracy over the four test sets; LA: learned accuracy on each fine class at the end of its training phase; BWT: change on fine classes 3 to 5 from the end of their phase to the end of the run; BWT₀: change on fine classes 1 and 2 over the run; FWT: gain on a class before its own phase; Forgetting: largest drop of a class learnt in the run from its best at a phase boundary. BWT₀ and FWT are measured from the end of pre-training, so a model that starts lower scores higher on both. n: seeds. ACC is mean ± one standard deviation over seeds; the standard deviations of the other metrics are at most 0.032 for the RL-STM and the sparse supervised STM, 0.011 for the other heads and 0.012 for LTM-only fine-tuning. Budget: training epochs per phase. Bold: best ACC, LA, BWT and Forgetting in each block.
| Pair | Model | n | ACC | LA | BWT | BWT₀ | FWT | Forgetting | Budget |
|---|---|---|---|---|---|---|---|---|---|
| A | RL-STM | 3 | 0.753 ±0.010 | 0.795 | -0.082 | -0.003 | +0.182 | 0.086 | 12 |
| Sparse supervised STM | 3 | 0.722 ±0.012 | 0.822 | -0.168 | -0.114 | -0.011 | 0.169 | 12 | |
| Linear probe | 5 | 0.773 ±0.002 | 0.813 | -0.096 | -0.016 | +0.158 | 0.100 | 8 | |
| NCM | 5 | 0.792 ±0.000 | 0.794 | -0.028 | -0.078 | +0.003 | 0.035 | 49 | |
| FlyModel | 5 | 0.791 ±0.005 | 0.771 | -0.013 | -0.055 | +0.029 | 0.017 | 1 | |
| SDMLP | 5 | 0.794 ±0.001 | 0.794 | -0.031 | -0.073 | +0.027 | 0.031 | 16 | |
| LTM-only fine-tuning | 5 | 0.743 ±0.005 | 0.888 | -0.206 | +0.190 | +0.346 | 0.206 | 10 | |
| B | RL-STM | 3 | 0.912 ±0.004 | 0.919 | -0.009 | +0.092 | +0.172 | 0.010 | 12 |
| Sparse supervised STM | 3 | 0.904 ±0.004 | 0.914 | -0.018 | -0.012 | +0.009 | 0.020 | 12 | |
| Linear probe | 5 | 0.915 ±0.001 | 0.913 | -0.006 | +0.041 | +0.081 | 0.010 | 8 | |
| NCM | 5 | 0.919 ±0.000 | 0.918 | -0.007 | +0.002 | -0.006 | 0.008 | 49 | |
| FlyModel | 5 | 0.928 ±0.002 | 0.925 | -0.001 | -0.008 | +0.007 | 0.002 | 1 | |
| SDMLP | 5 | 0.925 ±0.001 | 0.943 | -0.025 | -0.012 | -0.008 | 0.025 | 16 | |
| LTM-only fine-tuning | 5 | 0.911 ±0.008 | 0.969 | -0.067 | +0.141 | +0.314 | 0.067 | 10 | |
| C | RL-STM | 3 | 0.715 ±0.009 | 0.703 | -0.056 | +0.067 | +0.143 | 0.058 | 12 |
| Sparse supervised STM | 3 | 0.693 ±0.019 | 0.789 | -0.164 | -0.156 | -0.056 | 0.164 | 12 | |
| Linear probe | 5 | 0.742 ±0.000 | 0.790 | -0.120 | -0.003 | +0.089 | 0.120 | 8 | |
| NCM | 5 | 0.749 ±0.000 | 0.738 | -0.055 | -0.023 | -0.037 | 0.055 | 49 | |
| FlyModel | 5 | 0.738 ±0.002 | 0.714 | -0.032 | -0.030 | -0.016 | 0.034 | 1 | |
| SDMLP | 5 | 0.765 ±0.002 | 0.772 | -0.068 | -0.036 | -0.033 | 0.068 | 16 | |
| LTM-only fine-tuning | 5 | 0.716 ±0.001 | 0.896 | -0.264 | +0.045 | +0.286 | 0.264 | 10 | |
| D | RL-STM | 3 | 0.739 ±0.004 | 0.738 | -0.027 | +0.038 | +0.263 | 0.032 | 12 |
| Sparse supervised STM | 3 | 0.715 ±0.008 | 0.744 | -0.049 | -0.126 | +0.034 | 0.051 | 12 | |
| Linear probe | 5 | 0.766 ±0.001 | 0.766 | -0.019 | -0.002 | +0.216 | 0.025 | 8 | |
| NCM | 5 | 0.770 ±0.000 | 0.736 | +0.007 | -0.030 | +0.028 | -0.004 | 49 | |
| FlyModel | 5 | 0.772 ±0.005 | 0.747 | -0.006 | -0.025 | +0.027 | 0.007 | 1 | |
| SDMLP | 5 | 0.767 ±0.001 | 0.769 | -0.036 | -0.060 | +0.027 | 0.037 | 16 | |
| LTM-only fine-tuning | 5 | 0.764 ±0.005 | 0.849 | -0.105 | +0.121 | +0.445 | 0.105 | 10 | |
| Mean A–D | RL-STM | 3 | 0.780 | 0.789 | -0.043 | +0.049 | +0.190 | 0.046 | |
| Sparse supervised STM | 3 | 0.759 | 0.817 | -0.100 | -0.102 | -0.006 | 0.101 | ||
| Linear probe | 5 | 0.799 | 0.821 | -0.060 | +0.005 | +0.136 | 0.064 | ||
| NCM | 5 | 0.808 | 0.796 | -0.021 | -0.032 | -0.003 | 0.023 | ||
| FlyModel | 5 | 0.807 | 0.789 | -0.013 | -0.029 | +0.012 | 0.015 | ||
| SDMLP | 5 | 0.813 | 0.819 | -0.040 | -0.045 | +0.003 | 0.040 | ||
| LTM-only fine-tuning | 5 | 0.784 | 0.900 | -0.160 | +0.124 | +0.348 | 0.160 |

Figure 6: Continual learning results, with test set accuracy for each of the four fine-class sets plotted over the three training phases. Results are averaged over the seeds and orderings of fine classes 3, 4 and 5. The different models shown here learn and forget to different degrees. LTM-only fine-tuning learns the current class more completely than the other models, but forgets a lot. The RL-STM doesn't learn as much, but forgets a lot less. The Sparse supervised STM forgets more than the RL-STM. The NCM "forgets" the least, but also learns less than the LTM.
3.2 Few-shot learning
Table 4 and figure 7 capture the performance of the STM variants and LTM fine-tuning after few-shot training on Pair A.
The FlyModel and SDMLP continual learning models do less well in this setting, with lower test accuracy than other models except where . They do retain the pre-trained fine classes, which improves their average accuracy.
LTM-only fine-tuning achieves the highest accuracy for . Although pre-trained on fine classes 1 and 2, the LTM has not been further trained for a binary classification scenario and therefore performs poorly for small on the pre-trained fine classes. Increased accuracy for larger represents transfer to pre-trained fine classes 1 and 2 during training of the few-shot fine class, likely mostly due to elimination of the other coarse classes.
RL-STM achieves the second highest accuracy on the few-shot trained class for suggesting that it generalizes relatively well. It retains its performance on pre-trained fine classes 1 and 2 albeit from a lower starting point (other configurations of the RL-STM were found to produce higher pre-training accuracy but were not used in this experiment; instead, the configuration was held constant from the continual learning experiment).
The RL-STM struggles with . This may be because the LTM needs almost no bias for optimal classification during STM pre-training. By comparing parameters before and after pre-training, we observe that the Critic experiences substantial change but the Actor doesn't. At the end of pre-training the Actor may have insufficient learning of the policies required to bias the LTM. With only one subsequent image to train on, the Actor might be unable to learn suitable policy for the test images.

Figure 7: Few-shot results for all STM variants and LTM-only fine-tuning. Results show mean test set accuracy on Pair A, separately trained and evaluated on fine-classes 3, 4, and 5. 10 seeds were used for N = 1 and 4 because performance is highly dependent on the images selected. 5 seeds were used for larger N. a) Accuracy on the few-shot trained fine-class (mean over 3, 4 and 5). b) Retention of pre-trained fine-classes 1 and 2. c) Mean of the four fine-class sets (1 & 2, 3, 4, and 5).
Table 4: Few-shot results for all STM variants and LTM-only fine-tuning on Pair A test sets. N denotes the number of training images of each fine-class 3, 4 or 5 presented per coarse class (100 images reserved for validation). All fine-classes were trained separately from checkpoints of the models pre-trained on fine classes 1 and 2. Values are test set accuracies. Top rows: final accuracy on the few-shot trained class. Middle rows: Forgetting on fine classes 1 and 2. Bottom rows: Test set averages over the four fine-classes after few-shot training. Start denotes test accuracy before few-shot training. Training epoch budgets can be found in table 6.
| Model | Start | N = 1 | N = 4 | N = 16 | N = 64 | N = 400 |
|---|---|---|---|---|---|---|
| Trained class | ||||||
| RL-STM | 0.471 | 0.501 ±0.018 | 0.658 ±0.041 | 0.781 ±0.016 | 0.804 ±0.010 | 0.814 ±0.012 |
| Sparse supervised STM | 0.640 | 0.641 ±0.029 | 0.669 ±0.030 | 0.708 ±0.027 | 0.717 ±0.036 | 0.720 ±0.037 |
| Linear probe | 0.506 | 0.509 ±0.002 | 0.684 ±0.021 | 0.721 ±0.024 | 0.764 ±0.006 | 0.793 ±0.001 |
| NCM | 0.673 | 0.673 ±0.000 | 0.716 ±0.010 | 0.758 ±0.011 | 0.745 ±0.003 | 0.767 ±0.000 |
| FlyModel | 0.671 | 0.672 ±0.005 | 0.673 ±0.004 | 0.677 ±0.006 | 0.729 ±0.005 | 0.778 ±0.005 |
| SDMLP | 0.664 | 0.664 ±0.004 | 0.737 ±0.029 | 0.664 ±0.002 | 0.754 ±0.013 | 0.773 ±0.002 |
| LTM-only fine-tuning | 0.287 | 0.559 ±0.072 | 0.721 ±0.030 | 0.805 ±0.009 | 0.832 ±0.009 | 0.880 ±0.005 |
| Forgetting, fine classes 1 and 2 | ||||||
| RL-STM | - | 0.012 ±0.019 | 0.040 ±0.031 | 0.014 ±0.011 | 0.012 ±0.011 | 0.026 ±0.016 |
| Sparse supervised STM | - | 0.001 ±0.002 | 0.017 ±0.020 | 0.029 ±0.016 | 0.041 ±0.013 | 0.042 ±0.019 |
| Linear probe | - | 0.003 ±0.002 | 0.028 ±0.018 | 0.010 ±0.009 | 0.017 ±0.005 | 0.022 ±0.002 |
| NCM | - | 0.000 ±0.000 | 0.010 ±0.004 | 0.026 ±0.007 | 0.020 ±0.004 | 0.023 ±0.000 |
| FlyModel | - | 0.000 ±0.000 | 0.001 ±0.001 | 0.001 ±0.001 | 0.009 ±0.005 | 0.032 ±0.008 |
| SDMLP | - | 0.000 ±0.000 | 0.043 ±0.016 | 0.000 ±0.000 | 0.035 ±0.002 | 0.048 ±0.004 |
| LTM-only fine-tuning | - | 0.049 ±0.026 | 0.021 ±0.022 | 0.000 ±0.000 | 0.000 ±0.000 | 0.000 ±0.000 |
| Average of the four test sets | ||||||
| RL-STM | 0.551 | 0.558 ±0.014 | 0.626 ±0.022 | 0.706 ±0.018 | 0.717 ±0.008 | 0.710 ±0.008 |
| Sparse supervised STM | 0.698 | 0.700 ±0.022 | 0.704 ±0.028 | 0.711 ±0.033 | 0.705 ±0.036 | 0.706 ±0.036 |
| Linear probe | 0.594 | 0.596 ±0.001 | 0.679 ±0.014 | 0.714 ±0.006 | 0.729 ±0.007 | 0.741 ±0.001 |
| NCM | 0.736 | 0.736 ±0.000 | 0.751 ±0.005 | 0.762 ±0.003 | 0.760 ±0.001 | 0.766 ±0.000 |
| FlyModel | 0.737 | 0.737 ±0.004 | 0.737 ±0.003 | 0.739 ±0.004 | 0.757 ±0.003 | 0.765 ±0.003 |
| SDMLP | 0.731 | 0.731 ±0.003 | 0.742 ±0.011 | 0.731 ±0.002 | 0.751 ±0.006 | 0.756 ±0.002 |
| LTM-only fine-tuning | 0.348 | 0.498 ±0.039 | 0.579 ±0.016 | 0.650 ±0.008 | 0.664 ±0.011 | 0.708 ±0.003 |
3.3 Episodic dynamics
To explore the interaction of RL-STM and LTM, figure 8 depicts key quantities which change during each episode, sampled from processing of 500 images. The majority of accuracy and bias magnitude is obtained from the first forward pass, with a further gain of approximately 5% accuracy within the arbitrary 8-step episode time limit. These results confirm that the model is not simply emitting a constant learned bias in the first forward pass, but adapting the bias to refine LTM output.
It is possible that this adaptation is also crucial during the training process, but this has not been further explored.
Logit entropy is consistently low despite changes in classification outcome (increasing accuracy shows that the outcome must change), indicating that the LTM is typically confident in its changing predictions.
How does the bias behave? The original concept was that the STM should induce the LTM to try to interpret the input in a particular way, searching for a good response. Since the classification does change within an episode, this is occurring to some extent.
To analyze this further, we produced prototype bias vectors for each coarse fine class combination as the mean of unit-length final bias vectors over all training images from Pair A, after a continual learning task. Predictions were generated for each test image bias vector by finding the closest class prototype, using cosine distance.
Analysis showed this predicted the coarse class with 76% accuracy but only predicted the fine-class with 27% accuracy, against a 10% chance level (5 fine classes 2 coarse classes). This suggests the STM may be overriding the LTM output rather than merely influencing it. However, it is possible that the STM induces a “Whale” classification by insisting that it looks like a “Dolphin”, rather than by forcing a Whale to be a Whale. The RL-STM never has access to fine-class labels, not even via rewards, so they only exist as statistical regularities in the data.
The trained bias on average moves LTM features slightly away from their own fine-class prototypes (cosine distance 0.81 to 0.78). It is possible they move towards a superposition of prototypes, or towards a prototype which more firmly defines the coarse class.

Figure 8: Analysis of STM behaviour within an episode. These data were collected from processing 500 images of Pair A fine-class 3 on which the RL-STM model was already trained. Accuracy and entropy are derived from the LTM output logits.
3.3.1 Prolonged LTM pre-training
We also performed some tests of the RL-STM architecture using a LTM checkpoint with prolonged pre-training (40 epochs). While these results were preliminary, RL-STM performance was overall significantly worse, suggesting that the representational plasticity of the LTM is important for the combined architecture. Representational plasticity refers to the ability for latent representations to be transformed from one prototype to another via bias, rather than capacity for further training. Explicit promotion of representational plasticity – possibly via label noise injection – might significantly enhance the combined architecture.
4 Discussion and Conclusion
To conclude, we will revisit the original objective of this research: to explore the capabilities of an active-perception STM in a CLS architecture, and to discover whether it can learn to modulate the behaviour of a slow-learning LTM to maximize a reward.
Is it possible for a RL-STM to learn to modulate the output of a LTM to achieve a task? Yes. This is a relatively challenging architectural choice because the RL-STM has a large output dimension, feedback via rewards is less specific, and it can only modify the classification output indirectly. In addition, all models were trained online. Despite these constraints, overall test set accuracy was comparable to the other approaches such as LTM fine-tuning in both continual and few-shot settings.
As described in table 2, the RL-STM can be used in a wider variety of task settings because it does not require target labels, a differentiable task loss, label-routed updates or phase change visibility, all of which are required by one or more comparison models.
Does the RL-STM architecture demonstrate effective generalization? Yes. In fact, in the few-shot setting where N is 16 or more, the RL-STM is more accurate than all other models tested, except LTM fine-tuning. The RL-STM also achieved higher forward transfer in the continual setting than all other models except LTM fine-tuning. This is despite having no features to promote regularization and generalization other than sparse activation and the episodic loop.
Was there evidence that the “episodic looking” concept could enhance model performance? Yes. Our baseline is LTM fine-tuning. We expected that freezing the LTM and adding sparse activation to the STM would provide some degree of protection from forgetting in a continual setting, and this was confirmed by experiment; all STM variants evidenced less forgetting than LTM fine-tuning.
We expected that an episodic forward process would explore a wider range of observations than a single forward pass, resulting in less forgetting in a continual setting and improved generalization in a few-shot setting (both due to different expressions of the same input). The RL-STM performed well in the few-shot setting and was resistant to forgetting in the continual setting. It demonstrated substantially higher forward transfer than all other STM variants. It outperformed the sparse supervised STM, which is basically the same model with a supervised loss instead of the TD-0 target (one-step return).
Analysis of accuracy changes within an episode showed that while most of the answer is obtained in the first forward pass, subsequent forward passes improve the resulting classification by approximately 5%. This requires an episodic or recurrent framing. The few-shot results suggest that all forward passes may contribute to training and may be responsible for a larger fraction of model performance than the in-episode uplift. To confirm this, an RL-STM with only one step per episode could be evaluated.
4.1 Limitations
The results reported here are only part of just one benchmark dataset, but they do characterise the performance of the RL-STM architecture and motivate further research. Overall, the RL-STM presents an interesting set of tradeoffs which differentiate it from the comparison and ablation models. However, it was not possible to beat the FlyModel and SDMLP STM variants in the continual setting.
During development of the RL-STM we explored methods to improve continual learning performance by conditioning the input and enhancing trainable parameter initialization. These methods were successful in improving cell utilization to over 95% but did not improve final test set accuracy in continual learning.
Further investigation showed that the limiting factor is the frozen LTM representation. In Pair A (aquatic mammals vs fish), almost all the forgetting is due to re-labelling sharks (fine-class 4) to dolphins (fine class 2) and whales (fine-class 5) or vice-versa. These animals do look alike and we found the sparse masks of sharks and whales overlap by an average of 0.82, almost as much overlap as two images of the same class (0.9).
These small differences can be exploited in a supervised classifier (the SDMLP achieved 81.3% overall in continual learning, +3.3% over the RL-STM), but the RL-STM must also induce the frozen LTM classifier to distinguish them, and they may be bound together in later residual stages. We found that the LTM was highly resistant to bias after stage 4 and after prolonged pre-training. We conclude that the combined architecture is sensitive to the LTM's representational plasticity.
4.2 Future work
To enhance the overall performance of the RL-STM we conclude that the LTM must be updated – this is the role of consolidation in the CLS architecture. To achieve this, a replay module is required to generate samples for LTM learning.
To test this architecture, we propose to add another continual learning experimental condition in which the samples are presented in a single correlated stream. This setting is designed to test the limits of LTM-only fine-tuning, which is expected to be dependent on iid sampling. Model variants which replay randomly sampled data to the LTM should be necessary for optimal learning. This setting is designed to mimic the conditions experienced by a single mobile robot which must learn a novel environment.
Given a single correlated stream, the replay module would face many of the same challenges encountered by the current STM variants, such as continual learning without forgetting earlier input, and few-shot generalization from incremental observation of input samples.
References
R. Bajcsy, Y. Aloimonos, and J. K. Tsotsos. Revisiting active perception. Autonomous Robots, 42(2): 177–196, 2018. doi: 10.1007/s10514-017-9615-3.
T. Bricken, X. Davies, D. Singh, D. Krotov, and G. Kreiman. Sparse distributed memory is a continual learner. In International Conference on Learning Representations (ICLR), 2023. URL https://arxiv.org/abs/2303.11934.
G. Chen. Where to look: A unified attention model for visual recognition with reinforcement learning. arXiv preprint arXiv:2111.07169, 2021.
Y. Chen, S. Zhang, X. Liu, M. Lu, K. Chen, H. Zhu, and X. Chen. Parameter-efficient continual learning for enhancing plasticity without forgetting under limited model capacity. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10789–10798, 2026.
S. Dasgupta, C. F. Stevens, and S. Navlakha. A neural algorithm for a fundamental computing problem. Science, 358(6364):793–796, 2017.
S. Dohare, R. S. Sutton, and A. R. Mahmood. Continual backprop: Stochastic gradient descent with persistent randomness. arXiv preprint arXiv:2108.06325, 2021.
Z. Fountas, M. A. Benfeghoul, A. Oomerjee, F. Christopoulou, G. Lampouras, H. Bou-Ammar, and J. Wang. Human-inspired episodic memory for infinite context LLMs. arXiv preprint arXiv:2407.09450, 2024. URL https://arxiv.org/abs/2407.09450.
I. J. Goodfellow, M. Mirza, D. Xiao, A. Courville, and Y. Bengio. An empirical investigation of catastrophic forgetting in gradient-based neural networks. arXiv preprint arXiv:1312.6211, 2013. URL https://arxiv.org/abs/1312.6211.
K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770–778, 2016.
P. Janson, W. Zhang, R. Aljundi, and M. Elhoseiny. A simple baseline that questions the use of pretrained-models in continual learning. In NeurIPS 2022 Workshop on Distribution Shifts, 2022. URL https://arxiv.org/abs/2210.04428.
P. Kanerva. Sparse Distributed Memory. MIT Press, 1988. ISBN 9780262111324.
J. Kirkpatrick, R. Pascanu, N. Rabinowitz, J. Veness, G. Desjardins, A. A. Rusu, K. Milan, J. Quan, T. Ramalho, A. Grabska-Barwinska, D. Hassabis, C. Clopath, D. Kumaran, and R. Hadsell. Overcoming catastrophic forgetting in neural networks. Proceedings of the National Academy of Sciences, 114(13):3521–3526, 2017. doi: 10.1073/pnas.1611835114. URL https://www.pnas.org.
A. Krizhevsky. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009.
D. Kumaran, D. Hassabis, and J. L. McClelland. What learning systems do intelligent agents need? Complementary learning systems theory updated. Trends in Cognitive Sciences, 20(7):512–534, 2016. doi: 10.1016/j.tics.2016.05.004. URL https://www.sciencedirect.com/science/article/pii/S1364661316300432.
J. L. McClelland, B. L. McNaughton, and R. C. O'Reilly. Why there are complementary learning systems in the hippocampus and neocortex: Insights from the successes and failures of connectionist models of learning and memory. Psychological Review, 102(3):419–457, 1995. doi: 10.1037/0033-295X.102.3.419.
M. McCloskey and N. J. Cohen. Catastrophic interference in connectionist networks: The sequential learning problem. In Psychology of Learning and Motivation, volume 24, pages 109–165. Academic Press, 1989. doi: 10.1016/S0079-7421(08)60536-8.
M. D. McDonnell, D. Gong, A. Parvaneh, E. Abbasnejad, and A. van den Hengel. RanPAC: Random projections and pre-trained models for continual learning. In Advances in Neural Information Processing Systems (NeurIPS), 2023. URL https://arxiv.org/abs/2307.02251.
V. Mnih, N. Heess, A. Graves, and K. Kavukcuoglu. Recurrent models of visual attention. Advances in neural information processing systems, 27, 2014.
V. Mnih, A. P. Badia, M. Mirza, A. Graves, T. Lillicrap, T. Harley, D. Silver, and K. Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In International conference on machine learning, pages 1928–1937. PmLR, 2016.
G. I. Parisi, R. Kemker, J. L. Part, C. Kanan, and S. Wermter. Continual lifelong learning with neural networks: A review. Neural networks, 113:54–71, 2019.
D. Rolnick, A. Ahuja, J. Schwarz, T. Lillicrap, and G. Wayne. Experience replay for continual learning. In Advances in Neural Information Processing Systems, volume 32, 2019. URL https://papers.nips.cc/paper_files/paper/2019/hash/fa7cdfad1a5aaf8370ebeda47a1ff1c3-Abstract.html.
A. C. Schapiro, N. B. Turk-Browne, M. M. Botvinick, and K. A. Norman. Complementary learning systems within the hippocampus: a neural network modelling approach to reconciling episodic memory with statistical learning. Philosophical Transactions of the Royal Society B: Biological Sciences, 372(1711):20160049, 2017. doi: 10.1098/rstb.2016.0049.
J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
Y. Shen, S. Dasgupta, and S. Navlakha. Reducing catastrophic forgetting with associative learning: A lesson from fruit flies. Neural Computation, 35(11):1797–1819, 2023. Preprint: arXiv:2107.07617 (2021), “Algorithmic insights on continual learning from fruit flies”.
E. Spens and N. Burgess. A generative model of memory construction and consolidation. Nature Human Behaviour, 8:225–240, 2024. doi: 10.1038/s41562-023-01799-z. URL https://www.nature.com/articles/s41562-023-01799-z.
W. Sun, M. Advani, N. Spruston, A. Saxe, and J. E. Fitzgerald. Organizing memories for generalization in complementary learning systems. Nature Neuroscience, 26:1438–1448, 2023. doi: 10.1038/s41593-023-01382-9.
L. Wang, X. Zhang, H. Su, and J. Zhu. A comprehensive survey of continual learning: Theory, method and application. IEEE transactions on pattern analysis and machine intelligence, 46(8): 5362–5383, 2024.
Y. Wu, G. Wayne, A. Graves, and T. Lillicrap. The Kanerva machine: A generative distributed memory. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id=S1H1A-ZAZ.
S. Zhang, J. Wang, R. Zhou, J. Liao, Y. Feng, Z. Li, Y. Zheng, W. Zhang, Y. Wen, Z. Li, F. Xiong, Y. Qi, B. Tang, and M. Wen. MemRL: Self-evolving agents via runtime reinforcement learning on episodic memory. arXiv preprint arXiv:2601.03192, 2026. URL https://arxiv.org/abs/2601.03192.
D.-W. Zhou, Z.-W. Cai, H.-J. Ye, D.-C. Zhan, and Z. Liu. Revisiting class-incremental learning with pre-trained models: Generalizability and adaptivity are all you need. International Journal of Computer Vision, 2024. arXiv:2303.07338.
A Hyperparameter optimization
To achieve a fair comparison of the methods in their optimal configurations, we performed a limited hyperparameter search of learning rates (5) and training epochs (6). Hyperparameters were optimized to the task by training on 400 of the images of each fine-class and evaluating on a validation split of 100 images. The validation splits were not used for final model training.
The decision to allow models to be trained on a larger number of forward passes assumes that the ultimate constraint is the number of samples available rather than the number of learning steps.
The exception is that the RL-STM training epochs were not optimized for the continual setting.
Table 5: Learning rates explored for each model on Pair A validation split.
| Model | Learning rates |
|---|---|
| RL-STM | Not tuned (0.1); learning rate 0.2 with zero momentum tested on validation set for Pair A and found to be equivalent. Few-shot training budget optimized, but not continual. |
| Sparse supervised STM | 0.1, 0.03, 0.01 |
| Linear probe | 0.0003, 0.001, 0.003 |
| NCM | none |
| FlyModel | Not tuned (0.2) |
| SDMLP | 0.015, 0.05, 0.15 |
| LTM-only fine-tuning | 0.01, 0.001, 0.0001, 0.00001 |
Table 6: Training budget optimization on the Pair A validation split. For each model and learning rate, the training epoch budget is selected to optimize mean accuracy on the four fine classes. Bold: chosen. §Not plateaued at the cap (RL-STM: 48 epochs, four times its starting budget). ‡RL-STM at : not plateaued at 24 epochs. -: not evaluated by hyperparameter search rule.
| Model | LR | Continual | Few-shot, | ||||
|---|---|---|---|---|---|---|---|
| 1 | 4 | 16 | 64 | 400 | |||
| RL-STM | 0.1 | 12 (fixed) | 1 (0.571) | 24 (0.646)‡ | 26 (0.721)§ | 21 (0.735)§ | 21 (0.731) |
| Sparse supervised STM | 0.01 | 12 (fixed) | 1 (0.714) | 8 (0.721) | 42 (0.736) | 6 (0.735) | 1 (0.740) |
| FlyModel | – | 1 (0.749) | 1 (0.745) | 1 (0.746) | 1 (0.744) | 3 (0.756) | 1 (0.770) |
| Linear probe | 0.0003 | 24 (0.770) | 1 (0.659) | 2060 (0.705) | 471 (0.721) | 126 (0.748) | 24 (0.755) |
| Linear probe | 0.001 | 8 (0.775) | 1 (0.658) | 589 (0.705) | 148 (0.722) | 36 (0.745) | 8 (0.759) |
| Linear probe | 0.003 | 3 (0.776) | 1 (0.658) | 185 (0.705) | 45 (0.720) | 12 (0.747) | 3 (0.758) |
| LTM-only fine-tuning | 0.0001 | 10 (0.796) | 1 (0.401) | 39802 (0.554)§ | 7597 (0.673) | 236 (0.703) | 13 (0.749) |
| LTM-only fine-tuning | 0.001 | 14 (0.773) | 25246 (0.479) | 24 (0.601) | 38 (0.650) | 9 (0.678) | 4 (0.698) |
| LTM-only fine-tuning | 0.01 | – | 4 (0.505) | 65 (0.522) | – | – | – |
| LTM-only fine-tuning | 0.00001 | – | – | – | – | – | 120 (0.749) |
| NCM | – | 49 (0.781) | 1 (0.742) | 702 (0.756) | 521 (0.765) | 77 (0.766) | 17 (0.770) |
| SDMLP | 0.015 | 51 (0.772) | 1 (0.744) | 2551 (0.756) | 1 (0.743) | 190 (0.760) | 40 (0.761) |
| SDMLP | 0.05 | 16 (0.773) | 1 (0.744) | 702 (0.752) | 1 (0.743) | 58 (0.760) | 14 (0.767) |
| SDMLP | 0.15 | 6 (0.774) | 1 (0.744) | 235 (0.752) | 45 (0.745) | 20 (0.762) | 6 (0.769) |
B Details of the LTM model
The LTM is a ResNet-18 model [He et al., 2016] adapted to CIFAR image sizes. The architecture is described in table 7. Input images are scaled to unit range by dividing by 255; no mean/standard-deviation normalization and no data augmentation are used at any stage, for any model.
Table 8 describes hyperparameters used in LTM pre-training.
Table 7: Long Term Memory configuration. Note there are 2 residual blocks per stage.
| Component | Output dimension |
|---|---|
| Input | |
| Stem: conv., 64 channels, stride 1 | |
| Stage 1: conv., 64 channels, stride 1 | |
| Stage 2: conv., 128 channels, stride 2 | |
| Multiplicative “bias” applied here. | |
| Stage 3: conv., 256 channels, stride 2 | |
| Stage 4: conv., 512 channels, stride 2 | |
| Mean pooling | (“encoding”) |
| Linear (“classifier”) | 20 classes |
Table 8: Long Term Memory hyperparameters
| Name | Value |
|---|---|
| Pretraining mini-batch size | 128 (16 in fine-tuning) |
| Optimizer | Adam |
| Learning rate | 0.001 (varied for fine-tuning) |
C RL-STM Hyperparameters
Table 9 contains RL-STM hyperparameters used in all experiments. A learning rate of 0.2 with momentum 0 was found to yield similar performance in ad-hoc testing (no advantage or disadvantage, contrary to findings in [Bricken et al., 2023]).
Note: Actor loss scaling is crucial to provide a sufficiently stable policy for Critic learning. No policy entropy management was implemented.
Table 9: RL-STM hyperparameters
| Name | Value |
|---|---|
| Pretraining mini-batch size | 16 |
| Fine-tuning mini-batch size | 16 |
| Optimizer | SGD |
| Learning rate | 0.1 |
| Momentum | 0.5 |
| Memory capacity | 1000 |
| Activation sparsity | 32 |
| Episode length (steps) | 8 |
| Context window length | 8 |
| Discount factor | 0.5 |
| Continuous policy Std. Dev. | 0.5 |
| Actor loss scale | 0.01 |
| Critic loss scale | 1.0 |
| Entropy loss | None |
D Details of other STM variants
All STM variants consume the 512-dimensional stage-4 pooled encoding of the frozen LTM, computed with the LTM in evaluation mode. Like the RL-STM and LTM-only models, all STM variants produce 20-way classification logits.
D.1 FlyModel
See [Shen et al., 2023] for details. Each encoding is min-max scaled, projected by a fixed binary random matrix onto 20,000 units (64 non-zero inputs per unit), and thresholded to the top 1% of units. Output weights are updated by a Hebbian rule: the active units are added to the row of the target class with learning rate 0.2 and clipped at 1. No gradients are used.
D.2 SDMLP
See [Bricken et al., 2023] for details. A hidden layer of 1000 units without bias, with non-negative weights and L2-normalized addresses and inputs, followed by subtractive Top-K inhibition with (the same as the RL and sparse supervised STM, and used in the cited work) and the “GABA switch”, then a linear read-out. It is trained by stochastic gradient descent on a cross-entropy loss (learning rate 0.05, momentum 0.9). The GABA switch threshold is scaled to the size of our pre-training set (12,000 activations per unit) since the original value assumes a much larger dataset.
D.3 Linear probe and NCM
The linear probe is a single linear layer initialized from the LTM’s own classifier and trained by SGD with a cross-entropy loss. The NCM classifier maintains a running mean encoding per coarse class and predicts by cosine similarity; classes not yet seen are excluded.