TL;DR
This paper introduces LILAC, an off-policy reinforcement learning algorithm designed to handle environments that change persistently over time (lifelong non-stationarity). LILAC leverages latent variable models to represent these environmental shifts and learns a policy conditioned on these representations, outperforming existing methods in challenging non-stationary settings.
What Problem Does This Paper Address?
Traditional reinforcement learning (RL) often assumes a stationary environment, meaning the rules (dynamics and rewards) of the world remain constant across all interactions. However, in real-world scenarios, like robotics or human-robot interaction, environments are rarely static. Goals, physical properties, or external conditions can change over time, sometimes gradually and sometimes abruptly. This "lifelong non-stationarity" poses a significant challenge for standard RL algorithms, especially off-policy methods that rely on replaying past experiences. These methods can struggle to adapt when the underlying environment dynamics have shifted, leading to degraded performance. The paper aims to bridge this gap by developing an RL agent that can explicitly reason about and adapt to these persistent environmental changes.
Methods
The core of the proposed solution, LILAC (Lifelong Latent Actor-Critic), is built upon a probabilistic graphical model that frames RL as an inference problem. The key innovation lies in how LILAC models non-stationarity. It introduces a Dynamic Parameter MDP (DP-MDP), where each episode presents a new, but sequentially related, task defined by latent parameters. These parameters evolve according to a dynamic system, capturing the inter-episode non-stationarity.
LILAC then employs variational inference to jointly learn:
- A latent variable model: This model, implemented using an inference network and a decoder, learns a compact representation of the current environmental state (the latent parameters $z$). This representation is conditioned on past experiences.
- A maximum entropy RL policy: The policy and critic networks are conditioned not only on the observed state but also on the inferred latent variables $z$. This allows the agent to adapt its behavior based on its understanding of the current environmental conditions.
Crucially, LILAC incorporates a learned prior over these latent variables, modeling their sequential dynamics ($p(z^i | z^{i-1})$). This prior helps the agent predict future environmental shifts and provides a better starting point for inference in new episodes. The overall objective is a variational lower bound that balances representation learning (ensuring the latent variables capture environmental changes) and reinforcement learning (optimizing for rewards and policy entropy).
Datasets
The paper introduces four novel continuous control environments designed to exhibit lifelong non-stationarity:
- Sawyer Reaching: The target position is unobserved and moves between episodes, forming a circle.
- Half-Cheetah Vel: The target velocity in the x-direction varies episodically.
- Half-Cheetah Wind+Vel: Combines varying target velocities with episodic changes in wind forces.
- Minitaur Mass: The mass of the agent (akin to payload) changes between episodes.
- 2D Open World: A non-episodic environment with non-stationary dynamics, including directed wind forces and action re-scaling that change every 100 timesteps.
These environments are used for training and evaluating LILAC and its baselines.
Key Insights and Ideas
- Lifelong non-stationarity is a critical challenge: The paper highlights that most RL algorithms are ill-equipped for environments that change persistently over long periods, a more realistic scenario than the stationary assumption.
- Latent variables as environmental snapshots: Representing the changing environment with latent variables ($z$) allows the agent to treat each episode as a distinct but related task, enabling adaptation.
- Modeling inter-episode dynamics is key: Simply inferring latent variables within an episode (like in some POMDP or BAMDP approaches) is insufficient. LILAC's ability to model how these latent variables evolve across episodes ($p(z^i | z^{i-1})$) provides a significant advantage.
- Off-policy learning can adapt: By combining latent variable modeling with off-policy maximum entropy RL (like Soft Actor-Critic), LILAC achieves sample efficiency while adapting to non-stationarity.
- Unified framework for RL and representation learning: The paper elegantly frames the problem as a joint inference task, optimizing for both accurate environmental representation and effective policy learning.
Key Results
In all four experimental domains, LILAC consistently outperformed baseline algorithms (SAC, SLAC, PPO) in terms of both higher and more stable returns.
- LILAC achieved substantial improvement over state-of-the-art RL methods in challenging continuous control tasks with significant non-stationarity.
- The method demonstrated its ability to handle simultaneous shifts in dynamics and rewards (e.g., Half-Cheetah Wind+Vel).
- LILAC was also effective in a non-episodic environment (2D Open World) without requiring explicit episode resets.
- The paper also showed that LILAC's performance was largely independent of the rate of environmental shift, performing well even when changes were rapid.
Limitations and Future Work
- Unrealistic assumption of parameter shifts: The current DP-MDP formulation assumes that task parameters shift between episodes, but not during an episode. Relaxing this would lead to a general POMDP, which is computationally intractable. However, the paper suggests that exploiting the structure of infrequent, discrete shifts (like in HM-MDPs or changepoint detection) could be a fruitful direction.
- Fixed latent variable per episode: Currently, the inferred latent variable $z$ is fixed for the entire duration of an episode. The authors suggest that updating $z$ during an episode, akin to Bayesian filtering by combining prior estimates with inferred values from partial trajectories, could further improve performance.
- Predictive estimate of future conditions: While LILAC models the dynamics of latent variables, the current policy uses a fixed $z$ for the episode. Improving the policy's ability to leverage the predictive nature of the latent dynamics model could be a future enhancement.
Summary updated