Confidence-Conditioned Value Functions for Offline Reinforcement Learning

Joey Hong, Aviral Kumar, Sergey Levine

TL;DR

Standard offline reinforcement learning (RL) methods rely on a fixed, hard-to-tune degree of pessimism to handle distribution shift, often leading to suboptimal performance. This paper introduces Confidence-Conditioned Value Learning (CCVL), a method that learns a range of value functions for varying degrees of conservatism and dynamically adapts its confidence level during online evaluation to maximize returns.

What Problem Does This Paper Address?

Offline RL aims to learn effective policies from static, pre-collected datasets without any real-time interaction. The primary hurdle is distribution shift: an agent might overestimate the value of "out-of-distribution" (OOD) actions simply because it hasn't seen them fail in the training data.

To combat this, researchers typically use conservative methods (like Conservative Q-Learning, or CQL) that intentionally underestimate Q-values for OOD actions. However, these methods require a fixed hyperparameter ($\alpha$) to define exactly how pessimistic the agent should be. If the agent is too pessimistic, it becomes "cowardly" and misses out on high-reward paths; if it's too optimistic, it exploits errors in its own value estimates and fails. Because this degree of conservatism is fixed during training, the agent cannot adjust if it realizes its estimates are too cautious or too risky during actual deployment.

Methods

The authors propose Confidence-Conditioned Value Functions, which treat the degree of conservatism not as a fixed hyperparameter, but as an input to the value function.

  1. CCVL Algorithm: Instead of learning a single Q-function $Q(s, a)$, the agent learns $Q(s, a, \delta)$, where $\delta \in (0, 1)$ represents a confidence level. A lower $\delta$ corresponds to a higher confidence that the estimate is a true lower bound, necessitating more pessimism.
  2. Modified Bellman Backup: The authors derive a new training objective that regularizes the Q-function based on $\delta$ and estimated state visitations. This ensures that for any given $\delta$, the learned value is a valid lower bound with probability $1-\delta$.
  3. IQN Parameterization: To handle the continuous input $\delta$, they build upon Implicit Quantile Networks (IQN), allowing a single neural network to represent the entire spectrum of conservative estimates.
  4. Online Adaptation: During evaluation, the agent maintains a "belief" distribution over which $\delta$ is most accurate. It uses Bellman consistency—checking how well its current value estimates predict observed rewards and next states—to update this belief. If the agent sees that a less pessimistic $\delta$ better explains the data, it shifts its behavior accordingly.

Datasets

The researchers evaluated CCVL on:

  • Didactic Gridworld: A custom 8x8 stochastic environment designed to test generalization to new dynamics (e.g., changing the probability of "slipping" into lava).
  • Atari 2600 Benchmarks: 17 games from the Arcade Learning Environment.
  • Dataset Variations: They used three types of offline data: 1% and 5% samples from a DQN replay buffer, and a "suboptimal" 10% dataset consisting of the first 20 million observations of a training run.

Key Insights and Ideas

  • Monotonicity of Pessimism: A key theoretical result is that $Q(s, a, \delta)$ is monotonic; as the required confidence increases (smaller $\delta$), the estimated value must decrease.
  • Pessimism is Context-Dependent: The "correct" level of conservatism isn't a global constant. In states with plenty of data, the agent can be bold; in data-sparse regions, it should be cautious. CCVL allows for this nuance.
  • Adaptation via Filtering: By treating the Bellman error as a surrogate log-likelihood, the agent can perform a form of online filtering to find the optimal $\delta$ for the current environment.
  • Safe Exploration: By learning both lower and upper bounds, the agent can perform "safe" online fine-tuning: it optimizes for the upper bound (optimism under uncertainty) but restricts its choices to actions where the lower bound (safety) is above a certain threshold.

Key Results

CCVL consistently outperformed state-of-the-art baselines like CQL and REM across diverse tasks.

  • Gridworld Generalization: In a stochastic gridworld where the environment became less risky during evaluation, CQL remained stuck in a suboptimal, "safe" path. CCVL successfully adapted its $\delta$ online, realized the risk was lower than expected, and switched to the optimal path.
Figure 1: Left. Effect of α on normalized returns of CQL and CCVL. Right. Adaptation of δ under CCVL.
  • Atari Performance: CCVL achieved higher normalized scores than all baselines across the 1% and 5% datasets. In specific games like Asterix and Breakout, CCVL improved performance by over 30% compared to standard CQL.
  • Online Fine-Tuning: When allowed to interact with the environment after offline training, CCVL showed much faster and higher improvement than CQL. Because CQL is stuck with its offline pessimism, it struggles to explore effectively during fine-tuning, whereas CCVL uses its learned upper bounds to guide exploration.

Limitations and Future Work

  • Function Approximation Theory: While the authors provide proofs for the tabular MDP case, extending these high-probability lower-bound guarantees to deep neural networks remains a theoretical challenge.
  • Continuous Action Spaces: The current implementation focuses on discrete actions (Atari). The authors suggest that extending this to continuous actor-critic frameworks is a vital next step for robotics applications.
  • Density Estimation: The method relies on estimating state visitations ($n(s)$), which can be difficult and computationally expensive in high-dimensional state spaces. The authors used a linear approximation in this work, but more robust density estimators could improve results.

Summary updated

BibTeX
@inproceedings{hong2023confidence,
  author = {Joey Hong and Aviral Kumar and Sergey Levine},
  title = {{Confidence-Conditioned Value Functions for Offline Reinforcement Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=Zeb5mTuqT5},
}
Figure