NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Nonstationary Reinforcement Learning with Linear Function Approximation

Huozhi Zhou, Jinglin Chen, Lav R. Varshney, Ashish Jagmohan

Abstract

We consider reinforcement learning (RL) in episodic Markov decision processes (MDPs) with linear function approximation under drifting environments. Specifically, both the reward and state transition functions can evolve over time, but their total variations do not exceed a variation budget. We first develop the LSVI-UCB-Restart algorithm, an optimistic modification of least-squares value iteration with periodic restarts, and bound its dynamic regret when variation budgets are known. Then, we propose a parameter-free algorithm, Ada-LSVI-UCB-Restart, that extends to unknown variation budgets. We also derive the first minimax dynamic regret lower bound for nonstationary linear MDPs and, as a byproduct, establish a minimax regret lower bound for linear MDPs. Finally, we provide numerical experiments to demonstrate the effectiveness of our proposed algorithms.

Introduction

Most classical reinforcement learning (RL) theory is built on the assumption of a stationary environment, where the underlying rules governing rewards and state transitions remain constant. However, real-world applications—ranging from autonomous driving with evolving traffic patterns to ad auctions with shifting user preferences—frequently violate this assumption. In such "drifting" environments, standard RL agents often fail because they rely on stale data that no longer reflects the current state of the world.

While nonstationary RL has been studied in simple "tabular" settings (where states and actions are discrete and few), scaling these solutions to complex, high-dimensional problems requires function approximation. This paper addresses the challenge of designing statistically efficient and computationally tractable algorithms for Nonstationary Linear MDPs. In this framework, the state space may be infinite, but the dynamics can be modeled as linear functions of some underlying features.

Methods

The authors introduce two primary algorithmic frameworks designed to track a moving target in high-dimensional spaces by utilizing the principle of periodic restarts.

1. LSVI-UCB-Restart

This algorithm builds upon the standard Least-Squares Value Iteration with Upper Confidence Bound (LSVI-UCB). To handle nonstationarity, the authors introduce a periodic restart mechanism. By wiping the agent's memory at specific intervals, the algorithm prevents old, irrelevant data from biasing the current strategy. When the "variation budget" (the total amount the environment changes over time) is known, the authors provide an optimal schedule for these restarts to balance the trade-off between learning new information and discarding the old.

2. Ada-LSVI-UCB-Restart

In practical scenarios, the variation budget is rarely known in advance. To solve this, the authors propose an adaptive version that employs a "bandit-over-bandit" mechanism. Using the EXP3-P algorithm as a master controller, Ada-LSVI-UCB-Restart treats different restart window sizes as "arms" in a multi-armed bandit problem. It learns which window size performs best based on observed rewards, effectively making the algorithm parameter-free and robust to unknown levels of environmental drift.

Theoretical Contributions

A significant contribution of this work is the establishment of a rigorous theoretical foundation for nonstationary linear MDPs.

  • Dynamic Regret: Unlike static regret, which compares an agent to a single best-fixed policy, dynamic regret compares the agent to the optimal policy at every time step. This is a much more demanding and relevant metric for changing environments.
  • The $T^{2/3}$ Limit: The authors derive the first minimax dynamic regret lower bound for this class of problems. They prove that for nonstationary linear MDPs, the best possible regret scales with $T^{2/3}$ (where $T$ is the total number of episodes).
  • Optimality: The proposed LSVI-UCB-Restart algorithm achieves a dynamic regret of $\tilde{O}(B^{1/3}d^{4/3}H^{4/3}T^{2/3})$, matching the fundamental limits regarding time ($T$) and variation ($B$).

Numerical Experiments

The effectiveness of these algorithms was validated using a synthetic "combination lock" environment. This setup is a classic "hard" RL problem consisting of 15 states and 7 actions, where an agent must find a specific, precise sequence of actions to receive a reward.

The authors tested two types of environmental drift:

  1. Abruptly-changing: The environment's model jumps to a new state every 100 episodes.
  2. Gradually-changing: The environment's parameters smoothly interpolate between different models over time.

In both scenarios, the proposed restart-based algorithms significantly outperformed stationary baselines like standard LSVI-UCB and Epsilon-Greedy. Notably, Ada-LSVI-UCB-Restart matched the performance of the version that had prior knowledge of the variation budget, demonstrating the success of the adaptive master-controller approach.

Conclusion and Future Work

This research provides a near-optimal framework for RL in nonstationary environments with linear function approximation. By demonstrating that "forgetting" is a powerful tool in a drifting world, the authors bridge the gap between theoretical RL and the dynamic nature of real-world applications.

Future work remains to tighten the dependencies on feature dimensions ($d$) and the planning horizon ($H$). Additionally, while the restart strategy is highly effective and computationally efficient, exploring active "change-detection" subroutines could further enhance performance in environments with specific types of drift. Finally, extending these principles to general function approximation, such as deep neural networks, remains a vital frontier for the field.

Summary updated

BibTeX
@article{zhou2022nonstationary,
  author = {Huozhi Zhou and Jinglin Chen and Lav R. Varshney and Ashish Jagmohan},
  title = {{Nonstationary Reinforcement Learning with Linear Function Approximation}},
  journal = {Accepted by TMLR},
  year = {2022},
  url = {https://openreview.net/forum?id=nS8A9nOrqp},
}
Figure