Reinforcement Learning in Adversarial and Non-Stationary Environments

This direction is merged into another direction: non-stationary environment adaptation. Its last version stays readable and citable here.

Version 1 of 196 papers98 conceptsfrozen 2026-10-04

In textbook reinforcement learning (RL), we often imagine the environment as a consistent, if complex, partner. We assume that if we pull a lever today and receive a reward, pulling it tomorrow under the same conditions will yield a reward drawn from the same probability distribution. This is the "stationary" assumption.

However, real-world applications—from high-frequency trading and online auctions to robotic safety and cybersecurity—rarely play by these rules. In these settings, the environment is non-stationary or even adversarial. The "casino" is rigged: the rewards and costs change over time, sometimes specifically to exploit the patterns the learner has just revealed.

From Stochastic to Adversarial Models

The shift from stationary to adversarial models began fundamentally with the Multi-Armed Bandit (MAB) problem. In their seminal work, Gambling in a Rigged Casino: The Adversarial Multi-Arm Bandit Problem, researchers Peter Auer, Nicolò Cesa-Bianchi, Yoav Freund, and Robert E. Schapire moved away from statistical averages. Instead of assuming rewards follow a fixed distribution, they treated the environment as an opponent.

In an Adversarial Markov Decision Process (AMDP), the loss functions are not fixed. They can be chosen arbitrarily by an adversary at each step. The goal of the agent shifts from finding the "optimal policy" to minimizing regret: the difference between the total loss the agent actually incurred and the loss it would have incurred had it followed the best single fixed policy in hindsight.

Learning with Limited Information

The challenge intensifies when the agent only receives bandit feedback. In a full-information setting, you see what you would have gained if you had taken a different path. In the bandit setting, you only see the reward for the action you actually took.

Navigating this requires a delicate balance of exploration. Algorithms like MarcoPolo, introduced by Raman Arora, Ambuj Tewari, and Ofer Dekel in Deterministic MDPs with Adversarial Rewards and Bandit Feedback, demonstrate that it is possible to achieve sub-linear regret even when the agent is "blind" to the rewards of unchosen actions and the environment is actively changing.

The Cost of Safety and Constraints

In many practical scenarios, we don't just want to maximize rewards; we must also obey constraints (e.g., a robot must not hit a wall). This leads to Constrained Markov Decision Processes (CMDPs).

In adversarial settings, safety becomes a moving target. Francesco Emanuele Stradi, Matteo Castiglioni, and Alberto Marchesi have explored this in Learning Adversarial MDPs with Stochastic Hard Constraints. They highlight a fundamental "cost of safety": in a truly malicious environment, you cannot simultaneously achieve zero constraint violation and zero regret. Instead, algorithms must navigate a "feasibility margin," ensuring safety with high probability while adapting to shifting losses.

Best of Both Worlds

A major trend in recent research is the development of "Best-of-Both-Worlds" algorithms. These are designed to be optimal if the environment happens to be stationary (stochastic) but remain robust if the environment turns out to be adversarial.

For example, Fang Kong and colleagues in Simultaneously Learning Stochastic and Adversarial Bandits with General Graph Feedback propose mechanisms that monitor whether observed rewards align with expected statistical concentrations. If the data deviates significantly—suggesting an adversary is at work—the algorithm triggers a transition to a more robust, conservative strategy.

Scaling to Large State Spaces

To make these theoretical guarantees practical, researchers use linear function approximation. This allows agents to generalize across similar states rather than learning every single state-action pair from scratch.

Algorithms like POWERS, developed by Jiafan He, Dongruo Zhou, and Quanquan Gu in Nearly Optimal Regret for Learning Adversarial MDPs with Linear Function Approximation, use weighted value functions and Bernstein-type confidence sets to handle adversarial rewards in large-scale episodic tasks. Similarly, ONLINE Q-REPS by Gergely Neu and Julia Olkhovskaya leverages mirror descent to provide efficient learning even when the state space is effectively infinite.

Why It Works: Decoupling and Optimism

The core intuition behind these robust algorithms often involves two strategies:

  1. Decoupling Exploration from Optimization: By using "reward-free" exploration sub-routines, as seen in work by Simon Shaolei Du and Kevin Jamieson in Improved Corruption Robust Algorithms for Episodic Reinforcement Learning, the agent can learn the environment's structure (transitions) independently of the manipulated rewards.
  2. Strategic Optimism: Algorithms like OPPO (Optimistic Proximal Policy Optimization) by Qi Cai and Chi Jin add an "optimism bonus" to policy updates. This ensures the agent continues to explore potentially high-reward areas even if an adversary temporarily makes them look unattractive.

By treating the environment not as a static map but as a dynamic participant, this research direction provides the mathematical tools necessary for RL to move from controlled laboratory settings into the unpredictable complexity of the real world.

Papers in this version

Showing 60 of 96 papers.

History & citationVersion 1 · 2026-10-04

Merged into another direction · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_reinforcement_learning_in_adversarial_an_b6e88443,
  title = {Reinforcement Learning in Adversarial and Non-Stationary Environments},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/reinforcement-learning-in-adversarial-and-non-stationary-environments/rdr_b6e884434b1d4b8797394026c37fed20},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-27},
}

This exact version (version 1, frozen text):

@misc{lacuna_reinforcement_learning_in_adversarial_an_b6e88443_v1,
  title = {Reinforcement Learning in Adversarial and Non-Stationary Environments},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/reinforcement-learning-in-adversarial-and-non-stationary-environments/rdr_b6e884434b1d4b8797394026c37fed20/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-27},
}