Understanding the Effects of Dataset Characteristics on Offline Reinforcement Learning

Kajetan Schweighofer, Markus Hofmarcher, Marius-Constantin Dinu, Philipp Renz, Angela Bitto-Nemling, Vihang Prakash Patil, Sepp Hochreiter

TL;DR

Offline reinforcement learning promises to train agents from static, pre-collected datasets without dangerous trial-and-error in the real world. However, an algorithm's success is heavily governed by two data properties: Trajectory Quality (TQ) and State-Action Coverage (SACo). This paper presents a systematic empirical study showing that standard off-policy DQN variants require high coverage to avoid catastrophic extrapolation errors, constrained offline RL algorithms excel across balanced or high-quality regimes, and simple Behavior Cloning often matches or beats complex offline RL when datasets are dominated by expert demonstrations.

What Problem Does This Paper Address?

In real-world settings like autonomous driving or industrial robotics, training an agent via online reinforcement learning (RL) is risky and expensive. Offline RL sidesteps this by learning strictly from pre-recorded transition logs.

Yet, offline RL benchmarks are notoriously inconsistent: some studies evaluate algorithms on datasets logged from random agents, others on full training replay buffers, and others on noisy expert trajectories. Because algorithms perform very differently depending on how the data was gathered, it is difficult to determine which algorithmic mechanisms actually drive success. The authors set out to systematically disentangle how specific dataset properties impact the performance of different classes of offline RL algorithms.

Methods

The authors categorize datasets along two intuitive axes:

  1. Relative Trajectory Quality (TQ): The normalized average return of the trajectories in the dataset relative to a random baseline ($g_{\min}$) and an online expert ($g_{\max}$).
  2. Relative State-Action Coverage (SACo): The diversity of states and actions visited, defined as the ratio of unique state-action pairs in the dataset relative to a full training replay buffer. To measure this efficiently across large datasets, the authors use HyperLogLog, a probabilistic cardinality estimation algorithm with an $O(N)$ run-time and tiny memory footprint ($O(\log \log N)$).

The authors ran 5,500 training trials across nine algorithms representing distinct design philosophies:

  • Imitation: Behavior Cloning (BC).
  • Standard Off-Policy Q-Learning: DQN, Quantile-Regression DQN (QR-DQN), and Random Ensemble Mixture (REM).
  • Policy-Constrained / Regularized Offline RL: Batch-Constrained Q-learning (BCQ), Conservative Q-learning (CQL), and Critic Regularized Regression (CRR).
  • Behavior Policy Value Estimation: Behavior Value Estimation (BVE) and Monte-Carlo Estimation (MCE).

Datasets

The authors synthesized 150 datasets spanning six discrete-action environments across three benchmarks:

  • OpenAI Gym Classic Control: CartPole-v1 and MountainCar-v0 ($10^5$ transitions each).
  • MiniGrid: LavaGapS7-v0 and Dynamic-Obstacles-8x8-v0 ($10^5$ transitions each).
  • MinAtar: Breakout and SpaceInvaders ($2 \times 10^6$ transitions each).

For each environment, data was gathered across five independent seeds under five standard collection regimes:

  • Random: Purely uniform random actions (low TQ, variable coverage).
  • Expert: Trajectories generated by a fully trained, converged DQN agent without exploration (high TQ, narrow coverage).
  • Mixed: A mixture of 80% expert and 20% random trajectories.
  • Noisy: Expert policy acting with $\epsilon = 0.2$ random exploration.
  • Replay: The entire experience replay buffer collected during online training of an expert DQN agent.

Key Insights and Ideas

  • Replay buffers are the "sweet spot" for Offline RL: Replay datasets naturally balance moderate-to-high trajectory quality with wide state-action coverage. This setting is where offline RL algorithms provide the most value over simple imitation.
  • Off-policy DQN variants require high coverage, not high quality: Standard DQN, QR-DQN, and REM collapse on pure expert data because unseen state-action pairs lead to out-of-distribution value overestimation. They only perform well when SACo is high.
  • When data is good, Behavior Cloning is hard to beat: On expert datasets with high TQ, Behavior Cloning consistently matches or outperforms specialized offline RL algorithms—without ever observing rewards or solving Bellman equations.
  • Policy constraints rescue offline RL in narrow regimes: Algorithms that explicitly penalize or restrict actions far from the data distribution (BCQ, CQL, CRR) handle low-coverage, high-quality data far better than unconstrained Q-learning methods.

Key Results

  • DQN collapses on Expert Data: In MinAtar Breakout, DQN achieves an normalized score of just $0.01 \pm 0.01$ on expert data, while BC achieves $0.82 \pm 0.09$, BCQ achieves $0.81 \pm 0.09$, and CQL achieves $0.77 \pm 0.15$. Similarly, in SpaceInvaders, DQN drops to $0.02 \pm 0.03$ on expert data.
  • Offline RL shines on Replay Data: On SpaceInvaders-MinAtar, offline methods trained on replay data match or exceed the online expert: DQN achieves $1.29 \pm 0.07$, BCQ hits $1.25 \pm 0.07$, and CQL reaches $1.26 \pm 0.07$, whereas BC only manages $0.62 \pm 0.02$.
  • Imitation fails when quality drops: In CartPole-v1, BC scores only $0.01$ and $0.08$ on random and mixed datasets, respectively. In contrast, value-regularized algorithms like CQL recover scores of $0.65$ and $0.73$.

Limitations and Future Work

  • Discrete Actions Only: The empirical study focuses exclusively on discrete action domains (Classic Control, MiniGrid, MinAtar). Modern continuous control offline RL algorithms (such as TD3+BC, AWAC, or IQL) and benchmarks (like D4RL MuJoCo/AntMaze) were not evaluated.
  • Fixed Hyperparameters: Algorithms were evaluated using fixed default hyperparameters across dataset types rather than tuning per dataset regime, which may disadvantage methods sensitive to temperature or constraint thresholds.

Summary updated

Abstract

In real world, affecting the environment by a weak policy can be expensive or very risky, therefore hampers real world applications of reinforcement learning. Offline Reinforcement Learning (RL) can learn policies from a given dataset without interacting with the environment. However, the dataset is the only source of information for an Offline RL algorithm and determines the performance of the learned policy. We still lack studies on how dataset characteristics influence different Offline RL algorithms. Therefore, we conducted a comprehensive empirical analysis of how dataset characteristics effect the performance of Offline RL algorithms for discrete action environments. A dataset is characterized by two metrics: (1) the Trajectory Quality (TQ) measured by the average dataset return and (2) the State-Action Coverage (SACo) measured by the number of unique state-action pairs. We found that variants of the off-policy Deep Q-Network family require datasets with high SACo to perform well. Algorithms that constrain the learned policy towards the given dataset perform well for datasets with high TQ or SACo. For datasets with high TQ, Behavior Cloning outperforms or performs similarly to the best Offline RL algorithms.
BibTeX
@inproceedings{schweighofer2022understanding,
  author = {Kajetan Schweighofer and Markus Hofmarcher and Marius-Constantin Dinu and Philipp Renz and Angela Bitto-Nemling and Vihang Prakash Patil and Sepp Hochreiter},
  title = {{Understanding the Effects of Dataset Characteristics on Offline Reinforcement Learning}},
  booktitle = {CoLLAs},
  year = {2022},
  url = {https://openreview.net/forum?id=5RFwttmtOQA},
}
Figure