Abstract
Deep Neural Networks (DNNs) frequently struggle with catastrophic forgetting when learning tasks sequentially. This paper introduces Dynamos (Dynamic Modularity and Sparsity), a novel framework for General Continual Learning (GCL). Inspired by the sparse activation patterns of the biological brain, Dynamos utilizes reinforcement learning to dynamically select and activate specific subsets of filters for each input. By combining this input-dependent modularity with a rehearsal buffer and a prototype loss, the model achieves specialized representations that allow for semantic overlap between similar tasks while minimizing interference. Experimental results on benchmarks like Seq-SVHN and MNIST-360 demonstrate that Dynamos significantly outperforms existing state-of-the-art methods in non-stationary data environments.
1. Introduction
The ability to learn continuously from a stream of data without overwriting previously acquired knowledge is a hallmark of human intelligence, yet it remains a significant challenge for artificial neural networks. In standard DNNs, every parameter typically contributes to every output, leading to "catastrophic forgetting" where updates for new tasks degrade performance on older ones.
Existing approaches to this problem generally fall into two categories: rehearsal-based methods, which store and replay past data, and parameter isolation methods, which dedicate specific network components to specific tasks. However, rehearsal often suffers from task interference, and parameter isolation typically requires explicit knowledge of task boundaries or leads to unbounded model growth. Dynamos proposes a middle ground: a fixed-capacity network that learns to dynamically route information through sparse, specialized pathways based on the input itself.
2. Methodology
Dynamos treats the selection of convolutional filters as a discrete optimization problem solved via reinforcement learning. The architecture is defined by four key components:
2.1 Agent Modules
Each convolutional layer in the network is paired with an "agent" subnetwork—a lightweight self-attention mechanism. This agent processes the layer's input to predict a binary mask, determining which channels (filters) should be activated or dropped for that specific sample.
2.2 Policy Gradients (REINFORCE)
Because the decision to drop a filter is discrete and non-differentiable, the agents are trained using the REINFORCE policy gradient algorithm. The agents receive a reward signal that balances predictive accuracy with sparsity. This encourages the model to use the minimum number of filters necessary, promoting the development of specialized modules.
2.3 Prototype Loss
To ensure that the dynamic pathways correspond to meaningful semantic features, the authors implement a prototype loss. This loss function pulls the internal representation vectors of similar classes closer together in the latent space while pushing different classes apart. This forces the agents to develop distinct "pathways" for different types of data, facilitating better modularity.
2.4 Consistency and Rehearsal
Dynamos maintains a small memory buffer of previously seen samples. During training, the model optimizes a consistency loss to ensure that when an old sample is replayed, both the network's final predictions and its internal attention patterns remain consistent with their state when the data was first encountered.
3. Experimental Evaluation
The researchers evaluated Dynamos against several state-of-the-art baselines across three primary benchmarks designed to test different aspects of continual learning:
- Seq-MNIST and Seq-SVHN: Standard sequential datasets divided into distinct tasks to test Class-Incremental Learning (CIL).
- MNIST-360: A complex General Continual Learning (GCL) benchmark featuring rotating digits and shifting distributions without explicit task boundaries.
3.1 Key Results
Dynamos demonstrated superior performance across all benchmarks, particularly in settings with limited buffer sizes:
- Seq-SVHN: With a buffer of 500 samples, Dynamos achieved 84.8% accuracy, a substantial improvement over the previous state-of-the-art method, CCGN, which reached 67.4%.
- MNIST-360: On this boundary-free benchmark, Dynamos reached approximately 90.5% accuracy with a 500-sample buffer, consistently outperforming standard rehearsal baselines.
4. Discussion and Insights
4.1 Semantic Overlap and Reuse
Analysis of the model's activation patterns revealed that Dynamos naturally reuses filters for visually similar inputs. For instance, the model utilizes highly overlapping filter sets for the digits "1" and "7" due to their shared vertical structures, while using distinct sets for dissimilar digits like "1" and "8." This suggests the model successfully learns general-purpose features that can be shared across related tasks without manual intervention.
4.2 Biological Plausibility
The model exhibits "trial-to-trial variability" due to the Bernoulli sampling used in filter selection. This means the same input may trigger slightly different internal pathways across different runs while maintaining correct output, a phenomenon frequently observed in biological neural activity.
5. Conclusion and Future Work
Dynamos provides a robust framework for General Continual Learning by combining dynamic modularity with sparse activation. It maintains a fixed parameter count and does not require task labels at inference time, making it highly suitable for real-world, non-stationary data streams.
Future research will focus on scaling the agent-based architecture to high-resolution datasets like ImageNet and optimizing the computational overhead associated with reinforcement learning. Additionally, exploring how these dynamic agents perform in autonomous driving scenarios—where data distributions shift constantly—remains a promising avenue for development.
Summary updated