On Overfitting and Asymptotic Bias in Batch Reinforcement Learning with Partial Observability

Vincent François-Lavet, Guillaume Rabusseau, Joelle Pineau, Damien Ernst, Raphael Fonteneau

Abstract: This paper provides an analysis of the tradeoff between asymptotic bias (suboptimality with unlimited data) and overfitting (additional suboptimality due to limited data) in the context of reinforcement learning with partial observability. Our theoretical analysis formally characterizes that while potentially increasing the asymptotic bias, a smaller state representation decreases the risk of overfitting. This analysis relies on expressing the quality of a state representation by bounding $L_1$ error terms of the associated belief states. Theoretical results are empirically illustrated when the state representation is a truncated history of observations, both on synthetic POMDPs and on a large-scale POMDP in the context of smartgrids, with real-world data. Finally, similarly to known results in the fully observable setting, we also briefly discuss and empirically illustrate how using function approximators and adapting the discount factor may enhance the tradeoff between asymptotic bias and overfitting in the partially observable context.

The Goldilocks Problem of State Representation: Balancing Bias and Overfitting in Batch RL

In the world of Reinforcement Learning (RL), we often dream of agents learning through infinite interaction with an environment. However, in many real-world applications—such as medical treatments or power grid management—we cannot afford to let an agent "explore" freely. Instead, we utilize Batch RL, where the agent must learn the best possible policy from a fixed, pre-collected dataset.

A recent paper by Vincent François-Lavet and colleagues dives deep into a fundamental tension in this setting: the tradeoff between asymptotic bias and overfitting, specifically when the environment is only partially observable.

What Problem Does This Paper Address?

Most RL theory assumes a Markov Decision Process (MDP), where the current observation provides all the information needed for optimal decision-making. However, real-world problems are often Partially Observable (POMDPs). To make decisions, an agent must build a "state representation" ($H_t$) from its history of observations and actions.

Graphical model of a POMDP where the agent constructs a state representation $H_t$ from history to inform its policy.

This creates a dilemma:

  1. Asymptotic Bias: If your representation is too simple (e.g., you only look at the very last observation), you lose vital information about the hidden state ($s_t$). Even with infinite data, your policy will be suboptimal.
  2. Overfitting: If your representation is too complex (e.g., you look at a very long history), the number of possible "states" explodes. With a limited batch dataset, you won't have enough samples for each state, leading the agent to "overfit" to the noise in the data.

The authors seek to formalize this tradeoff and provide guidance on how to navigate it when you cannot collect more data.

Methods and Theoretical Framework

The authors analyze the problem by constructing a frequentist-based augmented MDP. Essentially, they take the history-based representation and treat it as the state in a new, fully observable MDP. The core of their theoretical contribution is the definition of $\epsilon$-sufficient statistics. A representation is $\epsilon$-sufficient if the information it retains allows it to approximate the true "belief state" (the probability distribution over hidden states) within an $L_1$ error of $\epsilon$.

Using this framework, they derive two major theorems:

  • Theorem 1 (Bias Bound): Quantifies how much performance is lost as a function of $\epsilon$.
  • Theorem 3 (Overfitting Bound): Quantifies the risk of suboptimality as the cardinality of the state representation increases relative to the dataset size.

Beyond the mathematics, they explore how Deep Q-Networks (DQNs) and the discount factor ($\gamma$) influence this tradeoff. Specifically, they show that artificially lowering the discount factor during training can act as a form of regularization, reducing overfitting at the cost of some bias.

Experimental Validation

The researchers validated their theories using two distinct setups:

  1. Synthetic POMDPs: Randomly generated environments with 5 states, 2 actions, and 5 observations. This allowed for controlled experiments on how dataset size and history length interact.
  2. Smartgrid Microgrid Benchmark: A large-scale, real-world application using actual solar irradiance and residential consumption data from Belgium. The agent must manage energy storage (batteries and hydrogen) to meet demand while minimizing costs—a classic POMDP because the "true state" involves hidden weather patterns and seasonal trends.

Key Insights and Results

  • The "U-Shaped" Performance Curve: As you increase the history length ($h$), performance initially improves as bias drops. However, once $h$ becomes too large for the available data, performance plummets due to overfitting. In synthetic tests, $h=1$ was best for small datasets (under 50 trajectories), but $h=3$ became superior as the dataset grew.
  • Neural Networks as Regularizers: Experiments show that deep learning architectures (like DQNs) are significantly more robust to overfitting than pure table-based frequentist methods. The neural network's inherent "inductive bias" helps it generalize even when the state space is large.
  • The Discount Factor as a Knob: Lowering the discount factor ($\Gamma < \gamma$) effectively shortens the agent's planning horizon. While this introduces bias, it reduces the variance of value estimates, making it a powerful tool to combat overfitting in data-scarce regimes.
  • Real-World Impact: In the smartgrid task, the authors demonstrated that even with sophisticated function approximators (CNNs), choosing the right history length remains critical. Using 12 hours of history outperformed 3 hours only when the training data was sufficiently diverse.

Limitations and Future Work

The authors acknowledge that their theoretical bounds are currently "loose." While they correctly predict the direction of the tradeoff, the specific numerical bounds are often too conservative for practical engineering use. Additionally, the overfitting analysis assumes a somewhat idealized sampling distribution. In real batch RL, the data is often collected by a specific "behavior policy," which might leave large parts of the state space unexplored—a challenge known as "distributional shift" that this paper touches on but does not fully solve.

Future work could involve dynamically adapting the state representation during training, effectively "growing" the agent's memory as it becomes more confident in the data.

Summary updated

BibTeX
@article{francoislavet2019overfitting,
  author = {Vincent François-Lavet and Guillaume Rabusseau and Joelle Pineau and Damien Ernst and Raphael Fonteneau},
  title = {{On Overfitting and Asymptotic Bias in Batch Reinforcement Learning with Partial Observability}},
  journal = {J. Artif. Intell. Res.},
  year = {2019},
  url = {https://openreview.net/forum?id=E69xzpzOpjw},
}
Figure