Pessimistic Value Iteration for Multi-Task Data Sharing in Offline Reinforcement Learning

Chenjia Bai, Lingxiao Wang, Jianye Hao, Zhuoran Yang, Bin Zhao, Zhen Wang, Xuelong Li · DOI

TL;DR

This paper introduces Uncertainty-based Data Sharing (UTDS), a novel approach for Multi-Task Data Sharing (MTDS) in offline Reinforcement Learning (RL). UTDS leverages ensemble-based uncertainty quantification to perform pessimistic value iteration on shared datasets, effectively mitigating the distribution shift problem and improving learning performance across tasks without discarding data.

What Problem Does This Paper Address?

Offline Reinforcement Learning (RL) aims to learn optimal policies from pre-collected datasets without further interaction with the environment. A key challenge in offline RL is the "distribution shift" – the discrepancy between the data distribution in the offline dataset and the distribution of states and actions visited by the learned policy. This shift can lead to inaccurate policy evaluation and suboptimal performance.

When dealing with limited data for a specific task, a natural solution is to leverage datasets from related tasks, known as Multi-Task Data Sharing (MTDS). However, simply combining datasets from different tasks can exacerbate the distribution shift problem, as the behavior policies that generated these datasets might be very different. Existing methods like Conservative Data Sharing (CDS) attempt to address this by carefully selecting data, but this often discards valuable information. This paper tackles the challenge of effectively sharing data across tasks in offline RL without data selection, while robustly handling the distribution shift.

Methods

The core of UTDS lies in its uncertainty-aware approach to data sharing. Instead of selecting data, UTDS:

  1. Aggregates Datasets: It combines the dataset of the target task with datasets from other related tasks.
  2. Ensemble Uncertainty Quantification: It trains an ensemble of Q-networks. The disagreement (standard deviation) among these Q-networks is used as a measure of uncertainty for state-action pairs. High uncertainty indicates sparse data coverage or out-of-distribution (OOD) states.
  3. Pessimistic Value Iteration: UTDS performs value iteration, but it penalizes state-action pairs with high uncertainty. This "pessimism" encourages the agent to be more conservative in areas where its knowledge is limited, effectively mitigating the negative impact of distribution shift.
  4. OOD Action Handling: UTDS specifically addresses out-of-distribution actions by sampling them and applying a similar uncertainty-based penalty, using a pseudo-target that doesn't rely on unknown rewards or transitions. The penalty for OOD actions is decayed exponentially during training to balance conservatism with learning progress.

This approach provides a unified framework for both single-task and multi-task offline RL, where the single-task case is a special instance of UTDS with only one shared dataset.

Datasets

The authors introduce a new benchmark for MTDS by collecting datasets from three challenging domains:

  • Walker: Controlling a biped in a 2D plane (tasks: Stand, Walk, Run, Flip).
  • Quadruped: Controlling a quadruped in 3D space (tasks: Jump, Roll-Fast, Walk, Run).
  • Jaco Arm: Controlling a robotic arm with a gripper (tasks: Reach top left, Reach top right, Reach bottom left, Reach bottom right).

These datasets were generated using the TD3 algorithm with different data collection strategies (random, medium, medium-replay, expert). The paper also mentions using the standard D4RL environment for some aspects, but their MTDS benchmark is specifically constructed for this work.

Key Insights and Ideas

  • Data Sharing Without Selection is Possible: The paper demonstrates that by intelligently handling uncertainty, one can share entire datasets from other tasks without needing to discard data, which is a significant improvement over methods like CDS.
  • Uncertainty as a Shield Against Distribution Shift: The core idea is that high uncertainty in state-action pairs directly correlates with the distribution shift problem. By penalizing these uncertain regions, UTDS effectively makes the learning process more robust.
  • Pessimism for OOD Actions: The method's ability to handle OOD actions by using a decaying penalty based on uncertainty is crucial for stable learning in offline RL.
  • Theoretical Guarantees: The paper provides theoretical analysis showing that the optimality gap of UTDS is directly related to the expected data coverage of the shared dataset, providing a strong foundation for its effectiveness.
  • Unified Framework: UTDS elegantly unifies single-task and multi-task offline RL, simplifying the approach to both scenarios.

Key Results

  • Outperforms State-of-the-Art: UTDS consistently outperforms baselines like Direct Sharing (CQL) and CDS across various tasks and domains, especially for non-expert datasets.
  • Significant Improvements in Challenging Scenarios: In domains like Jaco Arm, where behavior policies differ significantly across tasks, UTDS shows substantial improvements, highlighting its robustness to distribution shift.
  • Reduced Uncertainty: Visualizations show that data sharing with UTDS significantly reduces uncertainty in state-action spaces, particularly in areas that were previously sparsely covered.
  • Competitive Computational Cost: While UTDS requires more parameters due to the ensemble, its training time is competitive, and it avoids the overhead of data selection in CDS.

Limitations and Future Work

  • Representation Learning: The authors note that in domains with high-dimensional states (like Quadruped), the performance of uncertainty estimation can be affected by the quality of learned state-action representations. They suggest future work could involve combining UTDS with advanced representation learning methods.
  • Ensemble Size: While 5 ensembles were used and showed strong performance, the theoretical benefits of uncertainty quantification might be more fully realized with a larger number of ensembles, though this would increase computational cost.
  • Irrelevant Tasks: The theoretical analysis suggests that sharing data from completely irrelevant tasks might not improve performance, although it won't degrade it either, unlike policy constraint methods. Further empirical investigation into the impact of task relevance would be valuable.

Summary updated

BibTeX
@article{bai2024pessimistic,
  author = {Chenjia Bai and Lingxiao Wang and Jianye Hao and Zhuoran Yang and Bin Zhao and Zhen Wang and Xuelong Li},
  title = {{Pessimistic Value Iteration for Multi-Task Data Sharing in Offline Reinforcement Learning}},
  journal = {Artificial Intelligence},
  year = {2024},
  doi = {10.1016/j.artint.2023.104048},
}
Figure