Non-Stationary Learning of Neural Networks with Automatic Soft Parameter Reset

Alexandre Galashov, Michalis Titsias, András György, Clare Lyle, Razvan Pascanu, Yee Whye Teh, Maneesh Sahani

Abstract

Neural networks often struggle in non-stationary environments, where changing data distributions lead to a "loss of plasticity"—a state where the model becomes increasingly resistant to learning new information. This paper introduces Soft Resets, a mechanism that models network parameters as a dynamical system using an Ornstein-Uhlenbeck (OU) process. By automatically estimating a drift parameter $\gamma_t$ from the data stream, the algorithm detects non-stationarity and pulls parameters back toward their initialization. This approach restores plasticity while preserving useful knowledge, outperforming traditional hard resets and standard stochastic gradient descent (SGD) across various benchmarks, including reinforcement learning and permuted image classification.

Introduction

Standard deep learning assumes a stationary data distribution, yet real-world applications—particularly reinforcement learning (RL) and online learning—are inherently non-stationary. In these settings, neural networks frequently suffer from a loss of plasticity. This phenomenon is characterized by neurons becoming "dormant" or parameter norms growing excessively large, which destabilizes gradients and prevents the model from adapting to new tasks.

Existing solutions often rely on "hard resets," where portions of the network are periodically reinitialized. While effective at restoring learning capacity, hard resets are inefficient as they discard all previously acquired knowledge. This paper proposes a more nuanced alternative: Soft Parameter Resets, which provide a principled, automated way to maintain plasticity without the catastrophic forgetting associated with full reinitialization.

Methodology: The Soft Reset Framework

The core innovation of this work is treating neural network parameters as part of a stochastic dynamical system. Specifically, the authors utilize an Ornstein-Uhlenbeck (OU) process to govern parameter updates.

1. The Drift Model

The authors introduce a drift parameter, $\gamma_t$, which determines the degree to which parameters should be pulled back toward their initial distribution. When $\gamma_t = 1$, the model behaves like a standard stationary learner. When $\gamma_t < 1$, a "soft reset" is triggered, nudging the parameters back toward their initialization. This mechanism ensures that the network remains in a "plastic" region of the parameter space.

2. Online Estimation of Non-Stationarity

Unlike previous methods that require manual tuning or fixed reset intervals, Soft Resets learn the timing and magnitude of resets directly from the data. By monitoring how well the current model explains incoming data, the algorithm dynamically adjusts $\gamma_t$. If the model's predictive performance drops significantly—indicating a distribution shift—the value of $\gamma_t$ decreases, triggering a reset.

3. Adaptive Learning Dynamics

The mathematical formulation of the soft reset naturally results in an increased effective learning rate during the reset phase. This allows the network to rapidly adapt to the new distribution (a "sprint" phase) before stabilizing once the new task is mastered.

4. Algorithmic Variants

The paper presents two implementations:

  • Fast MAP: A computationally efficient version that integrates the drift model directly into the SGD update rule.
  • Bayesian Soft Reset: A more robust version that tracks parameter uncertainty. While more computationally intensive, the Bayesian approach provides superior performance in highly noisy environments by making more informed decisions about which parameters to reset.

Experimental Evaluation

The authors evaluated Soft Resets against standard SGD, hard resets, and L2-initialization across several challenging benchmarks:

  • Permuted MNIST: In this task, pixel shuffles change for every new task. Soft Resets demonstrated a superior ability to maintain high accuracy across a long sequence of permutations compared to baselines that eventually lost the ability to learn.
  • Random-label Benchmarks: Testing on MNIST and CIFAR-10 with random labels showed that Soft Resets help the network avoid the "brittleness" that comes from memorizing noisy data.
  • Reinforcement Learning: The method was integrated into the Soft Actor-Critic (SAC) algorithm and tested on Brax environments (Hopper-v5 and Humanoid-v4). In "highly off-policy" settings—where the replay buffer contains data from very different previous policies—Soft Resets significantly improved sample efficiency and final rewards.

Key Insights

  • Diagnostic Utility: The learned $\gamma_t$ serves as a diagnostic tool. In RL experiments, the authors observed that $\gamma_t$ dropped for the Value Function (the critic) but remained stable for the Policy (the actor), suggesting that the critic is the primary component affected by non-stationarity.
  • Preservation of Knowledge: Soft resets are particularly effective when tasks share underlying structures. By not wiping the parameters entirely, the network can pivot to new tasks faster than a model starting from scratch.
  • Robustness: Sensitivity analysis indicates that Soft Resets are less sensitive to hyperparameter selection than competing methods like "Shrink & Perturb," making them more practical for real-world deployment.

Limitations and Future Work

While promising, the approach has trade-offs. The Bayesian Soft Reset variant is computationally demanding, sometimes reaching 30x the cost of standard SGD. Additionally, tracking drift parameters for every layer increases the memory footprint. Future research may focus on reducing this overhead and exploring the theoretical regret bounds of soft resets in non-convex optimization landscapes. There is also significant potential in applying these techniques to broader continual learning scenarios to mitigate catastrophic forgetting.

Conclusion

Soft Resets offer a robust, automated solution to the loss of plasticity in non-stationary learning. By framing parameter updates through the lens of an OU process, the method allows neural networks to remain adaptable over long horizons, bridging the gap between the efficiency of continuous learning and the restorative power of reinitialization.

Summary updated

BibTeX
@inproceedings{galashov2024non,
  author = {Alexandre Galashov and Michalis Titsias and András György and Clare Lyle and Razvan Pascanu and Yee Whye Teh and Maneesh Sahani},
  title = {{Non-Stationary Learning of Neural Networks with Automatic Soft Parameter Reset}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=fDiZJ7mmOV},
}
Figure