Composite Flow Matching for Reinforcement Learning with Shifted-Dynamics Data

Ling-Kai Kong, Hai-Chuan Wang, Tonghan Wang, Guo-Jun Xiong, Milind Tambe
5/1/2025
12 citations
diffusion-flowrl

No official code found. Best implementation: Haichuan23/CompositeFlow (7 stars).

Abstract

Incorporating pre-collected offline data can substantially improve the sample efficiency of reinforcement learning (RL), but its benefits can break down when the transition dynamics in the offline dataset differ from those encountered online. Existing approaches typically mitigate this issue by penalizing or filtering offline transitions in regions with large dynamics gap.

Show full abstract

However, their dynamics-gap estimators often rely on KL divergence or mutual information, which can be ill-defined when offline and online dynamics have mismatched support. To address this challenge, we propose CompFlow, a principled framework built on the theoretical connection between flow matching and optimal transport. Specifically, we model the online dynamics as a conditional flow built upon the output distribution of a pretrained offline flow, rather than learning it directly from a Gaussian prior. This composite structure provides two advantages: (1) improved generalization when learning online dynamics under limited interaction data, and (2) a well-defined and stable estimate of the dynamics gap via the Wasserstein distance between offline and online transitions. Building on this dynamics-gap estimator, we further develop an optimistic active data collection strategy that prioritizes exploration in high-gap regions, and show theoretically that it reduces the performance gap to the optimal policy. Empirically, CompFlow consistently outperforms strong baselines across a range of RL benchmarks with shifted-dynamics data.

View on arXivView PDF

Code Implementations(1)

Official Github folder for the paper: Composite Flow Matching for Reinforcement Learning with Shifted-Dynamics Data (NeurIPS 2025 spotlight)

72

Similar Papers

Cite this paper

@article{kong2025composite,
  title  = {Composite Flow Matching for Reinforcement Learning with Shifted-Dynamics Data},
  author = {Ling-Kai Kong and Hai-Chuan Wang and Tonghan Wang and Guo-Jun Xiong and Milind Tambe},
  year   = {2025},
  eprint = {2505.23062},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2505.23062},
  url    = {https://doi.org/10.48550/arXiv.2505.23062},
  journal = {Neural Information Processing Systems}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.23062.svg)](https://codeofpaper.com/paper/2505.23062)

Discussion