Batch Policy Learning under Constraints

Hoang M. Le, Cameron Voloshin, Yisong Yue

TL;DR

This paper introduces the first systematic framework for batch reinforcement learning (RL) under multiple constraints using pre-collected, off-policy data. By framing the problem as a primal-dual game, the authors provide strong theoretical guarantees—improving the known sample complexity bound from $O(n^4)$ to $O(n^2)$—and introduce Fitted Q Evaluation (FQE), a highly effective off-policy evaluation method that excels in high-dimensional tasks.

What Problem Does This Paper Address?

Standard reinforcement learning typically focuses on optimizing a single scalar reward function. However, real-world applications often require balancing multiple, frequently conflicting objectives. For example, an autonomous vehicle controller needs to minimize travel time while simultaneously ensuring passenger comfort (smooth driving) and safety (lane keeping).

Furthermore, deploying an untrained agent to learn via online exploration in the real world can be dangerous or prohibitively expensive. While "batch RL" allows agents to learn from pre-collected historical data, doing so under multiple strict constraints has remained an open challenge. This paper tackles the problem of how to leverage abundant, non-optimal historical data to learn a policy that maximizes a primary objective while strictly satisfying multiple constraints.

Methods

The authors approach constrained batch policy learning through the lens of game theory and Lagrangian duality. They cast the optimization problem as a repeated two-player zero-sum game:

  1. The $\pi$-player (Policy): Minimizes the Lagrangian objective, trying to find the best policy given the current penalty weights.
  2. The $\lambda$-player (Constraints): Maximizes the Lagrangian, adjusting the penalty weights (multipliers) to punish constraint violations.

The authors propose a flexible meta-algorithm (Algorithm 1) that coordinates these players. The $\pi$-player uses Fitted Q Iteration (FQI) to learn the policy from batch data, while the $\lambda$-player uses a no-regret online learning algorithm, specifically Exponentiated Gradient (EG).

Crucially, verifying whether a policy satisfies constraints using historical data requires off-policy policy evaluation (OPE). The authors introduce Fitted Q Evaluation (FQE) (Algorithm 3), a simple, model-free technique that uses function approximation to estimate the expected costs of a policy. Unlike FQI, which uses a min operator to find the optimal actions, FQE evaluates the exact actions chosen by the target policy.

Additionally, the authors provide a refined theoretical analysis for general non-linear function approximation, tightening the sample complexity bound from $O(n^4)$ to $O(n^2)$.

Datasets

The framework was evaluated on two simulated environments modified from OpenAI Gym:

  • FrozenLake (8x8 Gridworld): The agent's primary goal is to navigate to a destination (rewarding $-1$ per step until reached). The safety constraint dictates that the agent must not fall into a hole more than 10% of the time ($\tau = 0.1$).
  • CarRacing: A high-dimensional environment where the state is a $96 \times 96 \times 3$ tensor of raw pixels. The primary objective is fast driving (distance coverage). The authors introduce two conflicting behavioral constraints: smooth driving (penalizing frequent braking) and lane centering (penalizing deviation from the center of the track).

Key Insights and Ideas

  • Reductions Simplify Complex Problems: Constrained batch RL can be elegantly broken down into standard, well-studied subroutines: standard batch RL (for policy generation) and online linear optimization (for updating constraint weights).
  • The Curse of Horizon in OPE: Traditional OPE methods like Importance Sampling (IS) suffer from high variance in long-horizon tasks. By using function approximation via FQE, the authors bypass the need to track exact trajectory probabilities, making constraint verification feasible even with high-dimensional pixel inputs.
  • One-Shot Regularization is Insufficient: Standard regularized RL requires tedious hyperparameter tuning of $\lambda$ weights. Because objectives conflict dynamically, small changes in $\lambda$ lead to wildly unstable policies. The game-theoretic formulation systematically finds the stable minimax equilibrium.

Key Results

The empirical results demonstrate that the meta-algorithm successfully minimizes the primary cost while keeping constraint violations below the specified thresholds.

In the FrozenLake domain, the algorithm converged rapidly to the optimal primal-dual gap. The returned policy successfully satisfied the safety constraint while matching the efficiency of an unconstrained online RL baseline.

FrozenLake Convergence and OPE Comparison

In the high-dimensional CarRacing domain, the algorithm successfully balanced speed, smooth braking, and lane keeping. It significantly outperformed the data-gathering policy and one-shot regularized Least-Squares Policy Iteration (LSPI), which failed to satisfy the constraints reliably. Furthermore, standalone testing showed that FQE provided highly accurate constraint cost estimates, vastly outperforming traditional OPE methods like Per-Decision Importance Sampling (PDIS) and Doubly Robust (DR) methods, which failed due to the environment's long horizon and high dimensionality.

Figure 2. CarRacing Results. (Left) & (Middle) (Lower is better) Comparing our algorithm, regularized LSPI, online RL w/o constraints, behavior policy πD w.r.t. main cost objectives and two constraints. (Right) FQE vs. other OPE methods on a standalone basis.

Limitations and Future Work

While the theoretical guarantees assume exact updates, very large-scale or continuous high-dimensional problems will inherently introduce noise into the policy updates and evaluations. The authors note that extending the framework to handle a "noisy update" variant is an important direction for future practical deployment. Additionally, a deeper exploration of the specific bias-variance characteristics of FQE relative to other emerging OPE techniques remains an open area for research.

Summary updated

BibTeX
@inproceedings{le2019batch,
  author = {Hoang M. Le and Cameron Voloshin and Yisong Yue},
  title = {{Batch Policy Learning under Constraints}},
  booktitle = {International Conference on Machine Learning},
  year = {2019},
  url = {https://openreview.net/forum?id=BJEgGi-OZH},
}
Figure