Urban-Focused Multi-Task Offline Reinforcement Learning with Contrastive Data Sharing

Xinbo Zhao, Yingxue Zhang, Xin Zhang, Yu Yang, Yiqun Xie, Yanhua Li, Jun Luo

Abstract

Enhancing diverse human decision-making processes in an urban environment is a critical issue across various applications, including ride-sharing vehicle dispatching, public transportation management, and autonomous driving. Offline reinforcement learning (RL) is a promising approach to learn and optimize human urban strategies (or policies) from pre-collected human-generated spatial-temporal urban data. However, standard offline RL faces two significant challenges: (1) data scarcity and data heterogeneity, and (2) distributional shift. In this paper, we introduce MODA — a Multi-Task Offline Reinforcement Learning with Contrastive Data Sharing approach. MODA addresses the challenges of data scarcity and heterogeneity in a multi-task urban setting through Contrastive Data Sharing among tasks. This technique involves extracting latent representations of human behaviors by contrasting positive and negative data pairs. It then shares data presenting similar representations with the target task, facilitating data augmentation for each task. Moreover, MODA develops a novel model-based multi-task offline RL algorithm. This algorithm constructs a robust Markov Decision Process (MDP) by integrating a dynamics model with a Generative Adversarial Network (GAN). Once the robust MDP is established, any online RL or planning algorithm can be applied. Extensive experiments conducted in a real-world multi-task urban setting validate the effectiveness of MODA. The results demonstrate that MODA exhibits significant improvements compared to state-of-the-art baselines, showcasing its capability in advancing urban decision-making processes.

Introduction

Optimizing strategies in urban settings—such as vehicle dispatching or route planning—is a complex task where "online" training is often impractical due to the risks and costs of real-world trial and error. Offline Reinforcement Learning (RL) offers a solution by learning from pre-collected historical Human-generated Spatial-Temporal Data (HSTD). However, this approach is hindered by three primary hurdles: Data Scarcity (individual agents lack sufficient data), Data Heterogeneity (agents have conflicting strategies), and Distributional Shift (models become unreliable when predicting actions not well-represented in the training set).

The MODA Framework

The MODA (Multi-Task Offline Reinforcement Learning with Contrastive Data ShAring) framework addresses these challenges through two core technical innovations.

1. Contrastive Data Sharing (CDS)

To overcome data scarcity without introducing noise from heterogeneous agents, MODA employs a selective data augmentation strategy. It decomposes long trajectories into shorter sub-trajectories and learns latent representations using a triplet loss mechanism:

  • Positive pairs: Sub-trajectories from the same agent in close spatial-temporal proximity.
  • Negative pairs: Sub-trajectories from different agents at the same state, representing divergent logic.

By pulling similar behaviors together and pushing dissimilar ones apart in the embedding space, MODA identifies and shares only the most relevant data from other tasks to augment the target task's dataset ($D_i^{eff}$).

2. Model-based Offline RL with Robust MDP

To mitigate distributional shift, MODA constructs a "Robust MDP." This architecture integrates a standard dynamics model with a Generative Adversarial Network (GAN). The GAN's Generator learns the underlying distribution of the environment, while the Discriminator serves as a reliability detector. During policy optimization (e.g., using Soft Actor-Critic), if the dynamics model predicts a transition that the Discriminator flags as "unreliable" or out-of-distribution, the MDP terminates the episode with a penalty. This prevents the agent from over-optimizing on "hallucinated" high-reward strategies.

The MODA framework architecture, featuring (a) Contrastive Data Sharing and (b) Model-Based Offline RL with Robust MDP.

Experimental Evaluation

MODA was evaluated using a massive real-world dataset consisting of GPS records from 17,877 taxis in Shenzhen, China. The city was discretized into a 40x50 grid, and a passenger-seeking simulator was developed to test policies across varying driver expertise levels (expert, medium, and random).

Key Results

MODA significantly outperformed state-of-the-art baselines including CQL, BCQ, BEAR, and MOReL, achieving an average cumulative reward of 134.06 (compared to the best baseline, BEAR, at 119.46).

An ablation study revealed that the GAN-integrated Robust MDP is critical; removing it (MODA-) caused performance to drop to 99.32. Furthermore, the efficacy of the Contrastive Data Sharing mechanism was confirmed: selective sharing proved superior to both "No Sharing" and "Sharing All" strategies.

Impact of the number of shared transitions on average reward across different driver expertise levels.

Discussion and Insights

Experimental data suggests a "sweet spot" for data sharing. As shown in the results, sharing too little data leaves the model under-trained, while sharing too much introduces noise that degrades performance. Interestingly, "expert" drivers required the least amount of shared data to reach peak performance, whereas "random" or novice drivers benefited significantly from selective augmentation with high-quality data from others.

Conclusion

MODA provides a robust framework for multi-task offline RL in urban environments. By combining selective contrastive sharing with a GAN-based safety mechanism, it effectively navigates the complexities of real-world human-generated data. Future work will explore applying this framework to other urban domains such as public transit management and bike-sharing systems.

Summary updated

BibTeX
@inproceedings{zhao2024urban,
  author = {Xinbo Zhao and Yingxue Zhang and Xin Zhang and Yu Yang and Yiqun Xie and Yanhua Li and Jun Luo},
  title = {{Urban-Focused Multi-Task Offline Reinforcement Learning with Contrastive Data Sharing}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2024},
  doi = {10.1145/3637528.3671823},
}
Figure