TL;DR
Deep reinforcement learning agents typically fail when environments change over time because they cling to outdated memories. This paper introduces Space-sampled Value Decay (SsVD), a biologically inspired forgetting mechanism that continuously decays action-values across the state space. SsVD enables popular algorithms like DQN and SAC to naturally adapt to environmental drift without requiring explicit task IDs or context.
What Problem Does This Paper Address?
Standard Reinforcement Learning (RL) assumes the world is stationary—that the rules of the game never change. However, real-world deployments face Non-Stationary Reinforcement Learning (NSRL) challenges: industrial robots suffer from mechanical wear-and-tear, and autonomous vehicles must navigate changing weather conditions.
When environmental parameters drift, deep RL agents struggle for two reasons:
- They rely on outdated transitions still lingering in their experience replay buffers.
- Neural networks can extrapolate wildly, assigning arbitrary values to states that haven't been visited recently.
While prior methods handle non-stationarity by demanding explicit "task IDs" or assuming the environment resets every episode, this paper tackles a more realistic and difficult assumption: drift occurs incrementally, continuously across episodes, and completely unobserved by the agent.
Methods
Inspired by behavioral biology models showing how rodents adapt to changing environments by forgetting unchosen actions, the authors propose Space-sampled Value Decay (SsVD).
Instead of only decaying values for actions not taken in the current state (which is limited to simple, single-state environments), SsVD scales forgetting to deep RL. The core mechanism works as follows:
- A distribution $\mathcal{D}_S$ is defined over the state space to allow for state sampling.
- During each training step, a mini-batch of random states is sampled from this distribution.
- The network's action-value (Q-value) estimates for all actions in these sampled states are decayed toward a baseline value $b$ (typically 0) using a forgetting rate $\eta$.
This mechanism is implemented seamlessly as an auxiliary loss function ($L_F$) added directly to standard value-based architectures like Deep Q-Networks (DQN) and Soft Actor-Critic (SAC).
Datasets
The authors evaluated their approach using Non-stationary Gym, curating a suite of environments featuring continuously drifting parameters:
- Classic Control: CartPole-v1 (force decreases), Acrobot-v1 (moment of inertia decreases), and MountainCar-v0 (engine force decreases).
- MuJoCo Physics Simulation: MountainCarContinuous-v0 (power decreases), InvertedPendulum-v5 (cart mass decreases), and Ant-v5 (gravity decreases).
Key Insights and Ideas
- Forgetting as a Regularizer: Forcing unvisited or old states to decay to a baseline prevents the neural network from holding onto stale information or making overconfident, incorrect predictions in drifted environments.
- The Stationary Boost: Surprisingly, even when evaluated on completely stationary environments (no drift), SsVD accelerates initial learning and acts as a defense against catastrophic forgetting. It effectively prevents the replay buffer from becoming overly homogenous.
- The Curse of Dimensionality: Uniformly sampling states works exceptionally well in low-dimensional control tasks but struggles in complex spaces like MuJoCo's Ant-v5. This reveals that how we choose what to forget is just as important as the act of forgetting itself.
Key Results
- DQN Enhancements: In drifting classic control tasks,
DQN_F(DQN + SsVD) consistently outperformed standard DQN. In MountainCar-v0, standard DQN's performance collapsed below an agent that stopped training entirely, whileDQN_Fmaintained strong performance. - SAC Enhancements: For continuous control,
SAC_Fmaintained a high return with low variance on InvertedPendulum-v5. In MountainCarContinuous-v0 (without specialized exploration mechanics), SsVD enabled successful learning where standard SAC completely failed.
Limitations and Future Work
The primary bottleneck of SsVD is its dependency on a known state distribution for sampling. While defining a state space boundary is realistic for robotic workspaces, it becomes impractical for pixel-based environments (like video games) where uniform pixel sampling is meaningless. Furthermore, naive uniform sampling fails in high-dimensional state spaces.
Future Directions: 1. Developing problem-agnostic sampling schemes that focus forgetting on regions where the action-value function is most uncertain. 2. Testing non-zero, problem-specific baseline values ($b$) for decay. 3. Extending the forgetting loss framework to popular on-policy architectures like Proximal Policy Optimization (PPO).
Summary updated