Introduction
Standard Reinforcement Learning (RL) typically operates under the assumption of a stationary environment, where the underlying physics and reward functions remain constant. However, real-world applications—such as robotics—frequently encounter non-stationarity. A robot may face varying wind speeds, shifting gravity across different terrains, or evolving target objectives.
Existing approaches to non-stationary RL, including many Meta-RL and latent-variable methods, attempt to capture these changes using a single, monolithic embedding vector to represent the "task" or "environment." This approach is often inefficient; if only a single environmental parameter (like wind speed) changes, the model should not need to re-evaluate its entire understanding of the environment's dynamics (like gravity). This paper introduces Factored Adaptation for Non-Stationary RL (FANS-RL), a framework designed to disentangle independent sources of non-stationarity by learning the underlying causal structure of the environment.
The FN-MDP Framework
The core of the FANS-RL approach is the Factored Non-stationary MDP (FN-MDP). This formal model augments the standard Markov Decision Process with latent change factors: $\theta^s$ for dynamics and $\theta^r$ for rewards. These factors are not static; they evolve according to their own Markov process, allowing the agent to track environmental shifts over time.
To manage these factors efficiently, FANS-RL employs three main components:
- Causal Graph Learning: Rather than treating transitions as a "black box," FANS-RL utilizes binary masks to learn a Dynamic Bayesian Network (DBN). This identifies specific dependencies between state dimensions, actions, and latent factors, determining exactly which factor influences which part of the system.
- FN-VAE Architecture: A Variational Autoencoder (VAE) is used to jointly learn the environment's structure and the latent factors. This architecture includes LSTM-based inference networks to estimate current latent factors from history, dynamics networks to predict factor evolution, and decoders that reconstruct transitions and rewards using the learned causal masks.
- Policy Optimization: The algorithm interleaves model estimation with Soft Actor-Critic (SAC) to ensure the agent adapts its behavior in real-time as the environment changes.
Experimental Evaluation
The researchers evaluated FANS-RL across several challenging benchmarks modified to simulate complex non-stationarity:
- Half-Cheetah-V3 (MuJoCo): Modified with varying wind forces, gravity, and target velocities using sine waves, damping functions, and discrete jumps.
- Sawyer-Reaching & Sawyer-Peg: Robotic arm tasks where the target location moves across episodes. The Sawyer-Peg experiment specifically utilized raw pixel inputs to test the model's ability to learn latent states directly from vision.
- Minitaur: A quadruped robot simulation where mass and target speed change concurrently, testing the model's ability to handle simultaneous sources of non-stationarity.
Key Insights and Results
FANS-RL demonstrates that disentangling environmental changes into individual factors significantly improves adaptation speed and overall returns. By modeling changes as separate factors, the agent can ignore dimensions of the environment that change but do not affect the reward, leading to more compact and effective representations.
Performance Highlights
- Superior Returns: FANS-RL consistently outperformed state-of-the-art baselines, including LILAC, ZeUS, and VariBAD. In the pixel-based Sawyer-Peg task, FANS-RL achieved a return of 18.01, a substantial improvement over the next best baseline, ZeUS, which achieved 12.45.
- Robustness: The performance gap between FANS-RL and competing methods widened as the degree of non-stationarity—defined by the frequency and magnitude of environmental shifts—increased.
- Interpretability: Visualizations confirmed that the learned latent factors ($\theta$) were highly correlated with true underlying physical parameters, such as target speed. This suggests the model successfully "understands" the physical shifts in the environment rather than merely memorizing patterns.
Theoretical Contributions
The paper provides a theoretical proof for Causal Identifiability. It demonstrates that under standard assumptions (such as the Markov property and "faithfulness"), the causal graph of the environment can be recovered even when the change factors are latent. This supports the idea that while environmental parameters change, the underlying causal structure (e.g., "wind affects velocity") remains invariant.
Limitations and Future Work
While FANS-RL offers a significant advancement in non-stationary RL, it faces certain limitations. Learning the causal graph structure is computationally intensive, which may impact scalability in environments with extremely high-dimensional state spaces. Additionally, the identifiability proofs rely on the "faithfulness" assumption, which can be challenged in purely deterministic systems.
Currently, the model assumes the causal links are invariant. If a new type of influence appears that was not present during training, the model cannot currently adapt its graph structure on the fly. Future research may focus on meta-learning these causal graphs across different tasks to improve the speed and scalability of the initial model estimation phase.
Summary updated