Introduction
In Reinforcement Learning (RL), agents frequently encounter the challenge of catastrophic forgetting. As an agent explores new environments and its policy evolves, the underlying data distribution shifts. Standard neural network architectures often struggle with this non-stationarity; updating weights to learn a new task can inadvertently overwrite the knowledge required for previously mastered skills.
To mitigate this, researchers traditionally rely on Experience Replay, storing vast amounts of historical data to periodically retrain the network. However, this approach is memory-intensive and fails to address the architectural root of the problem. This paper proposes that the global influence of standard activation functions, such as ReLU or Tanh, is a primary driver of forgetting. A single gradient update can affect the entire function space, damaging prior learning.
Local Elasticity and the Elephant Activation Function
The authors introduce the concept of local elasticity as a solution. A network is considered locally elastic if an update at a specific point in the input space does not significantly alter predictions at distant points. Through theoretical analysis using the Neural Tangent Kernel (NTK), the researchers demonstrate that achieving local elasticity in non-linear networks requires both sparse representations and sparse gradients.
To satisfy these requirements, the authors propose the Elephant Activation Function: $$Elephant(x) = \frac{h}{1 + |\frac{x}{a}|^d}$$ where $h$ determines the height, $a$ defines the width of the active zone, and $d$ controls the slope and gradient sparsity.
Unlike ReLU, which remains active for all positive inputs, the Elephant function is bell-shaped and locally supported. This ensures that an input only activates a small, local neighborhood of neurons, preserving the rest of the network's knowledge. The name is a dual reference to the mnemonic "an elephant never forgets" and the silhouette of the elephant-in-a-hat from The Little Prince.
Experimental Evaluation
The effectiveness of Elephant functions was validated across diverse benchmarks, including streaming regression, classical RL (e.g., MountainCar), Atari-10 games, class-incremental learning, and continuous control tasks (MuJoCo).
Key Results
- Memory Efficiency: In classical RL tasks, Elephant-based agents maintained high performance even when the experience replay buffer was reduced by 99% (from 10,000 to 100 transitions). In contrast, ReLU-based agents failed under these constraints.
- Sample Efficiency: On the Atari-10 suite, Elephant functions outperformed ReLU, Tanh, and other sparse activations like FTA or Maxout in human-normalized scores, even with standard buffer sizes.
- Robotics: In a real-robot reaching task (UR-Reacher-2), the Elephant function demonstrated superior sample efficiency compared to ReLU when operating with small buffers, highlighting its potential for physical systems where data acquisition is costly.
Conclusion and Future Work
By focusing on architectural properties rather than complex algorithmic fixes, Elephant Activation Functions provide a robust mechanism for reducing catastrophic forgetting. While the current implementation requires hyperparameter tuning for the width ($a$) and slope ($d$), the results suggest a significant leap in memory and sample efficiency for RL agents. Future research will likely focus on automated adaptation of these parameters to further enhance the stability and plasticity of neural networks in dynamic environments.
Summary updated