Reducing catastrophic forgetting when evolving neural networks

Joseph EarlyarXiv 2019

Abstract

A key stepping stone in the development of an artificial general intelligence (a machine that can perform any task), is the production of agents that can perform multiple tasks at once instead of just one. Unfortunately, canonical methods are very prone to catastrophic forgetting (CF) - the act of overwriting previous knowledge about a task when learning a new task. Recent efforts have developed techniques for overcoming CF in learning systems, but no attempt has been made to apply these new techniques to evolutionary systems. This research presents a novel technique, weight protection, for reducing CF in evolutionary systems by adapting a method from learning systems. It is used in conjunction with other evolutionary approaches for overcoming CF and is shown to be effective at alleviating CF when applied to a suite of reinforcement learning tasks. It is speculated that this work could indicate the potential for a wider application of existing learning-based approaches to evolutionary systems and that evolutionary techniques may be competitive with or better than learning systems when it comes to reducing CF.

Introduction

In the quest for Artificial General Intelligence (AGI), a major hurdle is Continual Learning (CL)—the ability of an agent to learn Task A, then Task B, without losing its proficiency in Task A. Standard artificial neural networks are notorious for Catastrophic Forgetting (CF). When training a network on a new task, the optimization process typically overwrites the weights that were carefully tuned for previous tasks. While the deep learning community has developed various regularization techniques to mitigate this, the field of Neuroevolution (NE)—which uses Genetic Algorithms to "evolve" networks rather than training them with gradients—has lacked similar, easily transferable methods.

Weight Protection (WP) Methodology

This research introduces Weight Protection (WP), a technique inspired by Elastic Weight Consolidation (EWC) from the deep learning domain. In EWC, weights important to a previous task are penalized if they change significantly during new training.

Because neuroevolution is gradient-free, WP simplifies this concept: it applies a uniform penalty ($\lambda_1$) to changes in all existing connections from the previous task and a separate penalty ($\lambda_2$) for adding new connections. The system utilizes a Topology and Weight Evolving Artificial Neural Network (TWEANN) approach, allowing the network to grow in complexity over time. To balance performance and efficiency, the NSGA-II algorithm is employed for multi-objective optimization, aiming to maximize task performance while minimizing network size to encourage modularity.

Experimental Framework

The method was evaluated using a suite of Reinforcement Learning (RL) environments, including classic control problems like Cart-Pole Balancing, Pendulum Swing-up, Acrobot, and Mountain Car. Additionally, a custom Partially Observable Markov Decision Process (POMDP) task was used to test the memory capabilities of evolved Recurrent Neural Networks (RNNs).

The Reinforcement Learning loop used for evaluating the evolved agents, featuring a neural network agent interacting with an environment like Mountain Car.

As shown in the figure above, the agent (a neural network) receives the current state ($s_t$) and reward ($r_t$) from the environment and produces an action ($a_t$). The goal of the evolutionary process is to optimize the agent's weights and topology to maximize cumulative rewards across sequential tasks without overwriting the logic required for earlier environments.

Key Results and Insights

The experiments compared four methods: Normal Evolution, Evolution with Modularity, Evolution with WP, and a hybrid of WP & Modularity.

  • Superior Retention: The "WP & Modularity" hybrid demonstrated the best retention. After learning a sequence of four tasks, its performance on the first task remained significantly higher (~0.415 mean fitness) compared to normal evolution (~0.151).
  • Solving CF: In the most successful individual runs, the hybrid approach achieved a perfect 1.0 fitness on the first task even after completing the entire sequence, effectively solving the catastrophic forgetting problem for this benchmark.
  • The Stability-Plasticity Trade-off: A clear Pareto front exists between remembering old tasks and learning new ones. High penalties ($\lambda_1$) lead to perfect memory but slower learning on new tasks, while low penalties lead to fast learning but rapid forgetting.

Conclusion

This work suggests that evolutionary methods might eventually surpass gradient-based learning in Continual Learning because they can evolve the structure of the network alongside the weights. This provides more "room" to store new knowledge without overwriting the old. Future work will focus on scaling WP to more complex environments, such as high-dimensional pixel inputs, and exploring dynamic network expansion to prevent capacity saturation.

Summary updated

BibTeX
@misc{early2019reducing,
  author = {Joseph Early},
  title = {{Reducing catastrophic forgetting when evolving neural networks}},
  year = {2019},
  eprint = {1904.03178},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1904.03178},
}
Figure