Abstract
Artificial intelligence systems often struggle with lifelong learning, specifically catastrophic forgetting and poor sample efficiency. We present Hebb (Memory-based Hebbian Parameter Adaptation), a unified framework that enables neural networks to rapidly acquire new knowledge from minimal examples while preserving existing information. By integrating a continuously updated memory module with a biologically-inspired Hebbian update rule, Hebb achieves superior performance in incremental and online learning scenarios across image and language domains.
Introduction: The Challenge of Lifelong Learning
Standard neural networks face two primary obstacles in dynamic environments. First is catastrophic forgetting, where training on new data overwrites weights essential for previous tasks. Second is poor sample efficiency, requiring thousands of examples to learn concepts that humans can grasp from just a few instances. While regularization and meta-learning have addressed these issues in isolation, a unified approach is necessary for the streaming nature of real-world data.
Methodology: The Hebb Framework
The proposed Hebb framework augments a standard neural classifier with a key-value memory module. The system operates through three core mechanisms:
- Representation Memorization: Hidden features (keys) and labels (values) are stored in a memory bank as data is encountered, preserving past experiences without full retraining.
- Hebbian Parameter Adaptation: During inference, the model retrieves similar examples from memory. Instead of slow gradient descent, it employs a Hebbian update rule—"cells that fire together, wire together"—to directly align retrieved representations with output layer weights.
- Dynamic Interpolation: A hybrid scheme blends fast Hebbian updates with traditional gradient-based adaptation (MbPA). A dynamic weighting term ensures the model relies on Hebbian rules for rare, new classes while shifting toward stable gradient updates as classes become more frequent.
Experimental Setup
Hebb was evaluated across three distinct learning scenarios:
- Permuted MNIST: Testing resistance to forgetting over 20 sequential tasks.
- CIFAR100: Incremental image classification where the model learns 50 classes on the fly after pre-training on 50.
- Language Modeling (PTB & WikiText-2): Assessing adaptation to new vocabularies and distribution shifts.
Results and Discussion
The Hebb framework demonstrates significant improvements in both learning speed and retention. In incremental CIFAR100 tasks, Hebb achieved 10.26% accuracy on new classes after a single epoch, outperforming the previous state-of-the-art (MbPA) at 7.01%. Furthermore, Hebb reached peak baseline accuracy in just 3 epochs, compared to the 10 epochs required by competitors.
In language modeling, Hebb notably reduced perplexity for rare words. Crucially, the Hebbian update is sparse, affecting only parameters relevant to retrieved neighbors, which prevents the "collateral damage" to old knowledge that typically causes forgetting. As shown in the Permuted MNIST results, Hebb maintains significantly higher accuracy over sequential tasks compared to standard MLPs and regularization methods like EWC.
Conclusion and Future Work
Hebb offers a practical solution for real-time applications, with computational overhead within 5% of existing memory-based methods. However, its performance remains dependent on the quality of the pre-trained feature extractor. Future research will explore intelligent memory curation for infinitely growing modules and extending Hebbian adaptation to complex tasks like object detection and reinforcement learning.
Summary updated